제출 #388756

#제출 시각아이디문제언어결과실행 시간메모리
388756AlexandraFootball (info1cup20_football)C++14
컴파일 에러
0 ms0 KiB
#include <iostream> #include <string> #include <vector> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int t, n, k, a, total; cin >> t; for (int=0; i>t; i++) { cin >> n >> k; total = 0; for (int=0; j>n; j++) { cin >> a; total += a; } cout << total % 2; } return 0; }

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

football.cpp: In function 'int main()':
football.cpp:12:13: error: expected unqualified-id before '=' token
   12 |     for (int=0; i>t; i++) {
      |             ^
football.cpp:12:13: error: expected ';' before '=' token
   12 |     for (int=0; i>t; i++) {
      |             ^
      |             ;
football.cpp:12:13: error: expected primary-expression before '=' token
football.cpp:12:17: error: 'i' was not declared in this scope
   12 |     for (int=0; i>t; i++) {
      |                 ^
football.cpp:12:20: error: expected ')' before ';' token
   12 |     for (int=0; i>t; i++) {
      |         ~          ^
      |                    )
football.cpp:12:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   12 |     for (int=0; i>t; i++) {
      |     ^~~
football.cpp:12:22: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   12 |     for (int=0; i>t; i++) {
      |                      ^
football.cpp:12:22: error: 'i' was not declared in this scope
football.cpp:10:12: warning: unused variable 'n' [-Wunused-variable]
   10 |     int t, n, k, a, total;
      |            ^
football.cpp:10:15: warning: unused variable 'k' [-Wunused-variable]
   10 |     int t, n, k, a, total;
      |               ^
football.cpp:10:18: warning: unused variable 'a' [-Wunused-variable]
   10 |     int t, n, k, a, total;
      |                  ^
football.cpp:10:21: warning: unused variable 'total' [-Wunused-variable]
   10 |     int t, n, k, a, total;
      |                     ^~~~~