실행 실패 (제출 코드 컴파일 에러)
Main.cpp:1:7: error: expected nested-name-specifier before ‘System’ 1 | using System.Text; | ^~~~~~ Main.cpp:5:22: error: ‘string’ has not been declared 5 | static void Main(string[] args) | ^~~~~~ Main.cpp:5:31: error: expected ‘,’ or ‘...’ before ‘args’ 5 | static void Main(string[] args) | ^~~~ Main.cpp:46:2: error: expected ‘;’ after class definition 46 | } | ^ | ; Main.cpp: In static member function ‘static void Program::Main(int*)’: Main.cpp:7:9: error: ‘var’ was not declared in this scope 7 | var sr = new StreamReader(Console.OpenStandardInput()); | ^~~ Main.cpp:8:13: error: expected ‘;’ before ‘sw’ 8 | var sw = new StreamWriter(Console.OpenStandardOutput()); | ^~ Main.cpp:9:13: error: expected ‘;’ before ‘sb’ 9 | var sb = new StringBuilder(); | ^~ Main.cpp:11:17: error: expected primary-expression before ‘int’ 11 | int n = int.Parse(sr.ReadLine()); | ^~~ Main.cpp:12:9: error: ‘Queue’ was not declared in this scope 12 | Queue<int> q = new Queue<int>(); | ^~~~~ Main.cpp:12:15: error: expected primary-expression before ‘int’ 12 | Queue<int> q = new Queue<int>(); | ^~~ Main.cpp:16:13: error: ‘string’ was not declared in this scope 16 | string[] cmd = sr.ReadLine().Split(); | ^~~~~~ Main.cpp:16:20: error: expected primary-expression before ‘]’ token 16 | string[] cmd = sr.ReadLine().Split(); | ^ Main.cpp:18:21: error: ‘cmd’ was not declared in this scope 18 | switch (cmd[0]) | ^~~ Main.cpp:21:21: error: ‘q’ was not declared in this scope 21 | q.Enqueue(int.Parse(cmd[1])); | ^ Main.cpp:21:31: error: expected primary-expression before ‘int’ 21 | q.Enqueue(int.Parse(cmd[1])); | ^~~ Main.cpp:24:21: error: ‘sb’ was not declared in this scope 24 | sb.AppendLine(q.Any() ? q.Dequeue().ToString() : "-1"); | ^~ Main.cpp:42:9: error: ‘sw’ was not declared in this scope 42 | sw.Write(sb); | ^~ Main.cpp:42:18: error: ‘sb’ was not declared in this scope 42 | sw.Write(sb); | ^~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.