AtCoder Beginner Contest 061

Submission #1590917

Source codeソースコード

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split(' ');
            int N = int.Parse(s[0]);
            int M = int.Parse(s[1]);
            int[] n = new int[N];
            for(int i = 0; i < M; i++)
            {
                s = Console.ReadLine().Split(' ');
                n[int.Parse(s[0])-1]++;
                n[int.Parse(s[1])-1]++;
            }
            for(int i=0;i<N;i++) Console.WriteLine(n[i]);
        }
    }
}

Submission

Task問題 B - Counting Roads
User nameユーザ名 agis
Created time投稿日時
Language言語 C++14 (GCC 5.4.1)
Status状態 CE
Score得点 -
Source lengthソースコード長 679 Byte
File nameファイル名
Exec time実行時間 -
Memory usageメモリ使用量 -

Compiler messageコンパイルメッセージ

./Main.cpp:1:7: error: expected nested-name-specifier before ‘System’
using System;
^
./Main.cpp:2:7: error: expected nested-name-specifier before ‘System’
using System.Collections.Generic;
^
./Main.cpp:3:7: error: expected nested-name-specifier before ‘System’
using System.Linq;
^
./Main.cpp:4:7: error: expected nested-name-specifier before ‘System’
using System.Text;
^
./Main.cpp:5:7: error: expected nested-name-specifier before ‘System’
using System.Threading.Tasks;
^
./Main.cpp:11:26: error: ‘string’ has not been declared
static void Main(string[] args)
^
./Main.cpp:11:35: error: expected ‘,’ or ‘...’ before ‘args’
static void Main(string[] args)
^
./Main.cpp:25:5: error: expected ‘;’ after class definition
}
^
./Main.cpp: In static member function ‘static void ConsoleApp1::Program::Main(int*)’:
./Main.cpp:13:13: error: ‘string’ was not declared in this scope
...

Test case