Submission #139696

#TimeUsernameProblemLanguageResultExecution timeMemory
139696ekremCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
t i = 1; i <= 4; i++){ if(i == ilk)continue; x[++m] = h[i]; } // cout << n << " " << ilk << " " << s << endl; for(int i = 2; i <= n - 1; i++){ string sor = ""; sor += s;sor += x[1];sor += x[1]; sor += s;sor += x[1];sor += x[2]; sor += s;sor += x[1];sor += x[3]; sor += s;sor += x[2]; // cout << n << " " << sor.size() << " " << sor << endl; int ans = press(sor); if(ans == i) s += x[2]; else if(ans == i + 1) s += x[1]; else s += x[3]; } for(int i = 1; i <= 3; i++){ if(press(s + x[i]) == n){ s += x[i]; break; } } return s; }

Compilation message (stderr)

combo.cpp:1:1: error: 't' does not name a type
    1 | t i = 1; i <= 4; i++){
      | ^
combo.cpp:1:10: error: 'i' does not name a type
    1 | t i = 1; i <= 4; i++){
      |          ^
combo.cpp:1:18: error: 'i' does not name a type
    1 | t i = 1; i <= 4; i++){
      |                  ^
combo.cpp:6:2: error: expected unqualified-id before 'for'
    6 |  for(int i = 2; i <= n - 1; i++){
      |  ^~~
combo.cpp:6:17: error: 'i' does not name a type
    6 |  for(int i = 2; i <= n - 1; i++){
      |                 ^
combo.cpp:6:29: error: 'i' does not name a type
    6 |  for(int i = 2; i <= n - 1; i++){
      |                             ^
combo.cpp:21:2: error: expected unqualified-id before 'for'
   21 |  for(int i = 1; i <= 3; i++){
      |  ^~~
combo.cpp:21:17: error: 'i' does not name a type
   21 |  for(int i = 1; i <= 3; i++){
      |                 ^
combo.cpp:21:25: error: 'i' does not name a type
   21 |  for(int i = 1; i <= 3; i++){
      |                         ^
combo.cpp:27:2: error: expected unqualified-id before 'return'
   27 |  return s;
      |  ^~~~~~
combo.cpp:28:1: error: expected declaration before '}' token
   28 | }
      | ^