제출 #1123862

#제출 시각아이디문제언어결과실행 시간메모리
1123862serifefedartarNaval battle (CEOI24_battle)C++20
컴파일 에러
0 ms0 KiB
{ fast; int N; cin >> N; for (int i = 1; i <= N; i++) { int x, y; char ch; cin >> x >> y >> ch; if (ch == 'E') E.push_back({{x, y}, i}); else S.push_back({{x, y}, i}); } for (auto u : E) mp[u.f.f + u.f.s].push_back({u.f, {'E', u.s}}); for (auto u : S) mp[u.f.f + u.f.s].push_back({u.f, {'S', u.s}}); for (auto u : mp) { sort(mp[u.f].begin(), mp[u.f].end()); queue<int> q; for (auto u : mp[u.f]) { if (u.s.f == 'E') q.push(u.s.s); else if (q.size()) q.pop(); else cout << u.s.s << "\n"; } while (!q.empty()) { cout << q.front() << "\n"; q.pop(); } } }

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp:1:1: error: expected unqualified-id before '{' token
    1 | {
      | ^