Submission #1590917
Source Code Expand
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 Info
Submission Time | |
---|---|
Task | B - Counting Roads |
User | agis |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 679 Byte |
Status | CE |
Compile Error
./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 ...