Submission #1059896

#TimeUsernameProblemLanguageResultExecution timeMemory
1059896kachim2Lottery (CEOI18_lot)C++17
Compilation error
0 ms0 KiB
int q; cin >> q; while(q--) { int k; cin >> k; for(int i = 0; i < n-l+1; i++) { int ans = 0; for(int j = 0; j < n-l+1; j++) { if (i==j) continue; int diff = 0; for(int llll = 0; llll < l; llll++) { diff+=a[i+llll]!=a[j+llll]; } if(diff<=k) ans++; } cout << ans << ' '; } cout << '\n'; } return 0; }

Compilation message (stderr)

lot.cpp:3:5: error: 'cin' does not name a type
    3 |     cin >> q;
      |     ^~~
lot.cpp:4:5: error: expected unqualified-id before 'while'
    4 |     while(q--)
      |     ^~~~~
lot.cpp:27:5: error: expected unqualified-id before 'return'
   27 |     return 0;
      |     ^~~~~~
lot.cpp:28:1: error: expected declaration before '}' token
   28 | }
      | ^