Submission #1287961

#TimeUsernameProblemLanguageResultExecution timeMemory
1287961eri16Cave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "cave.h" using namespace std; void exploreCave(int n){ int d[n],v[n]; for (int i=0; i<n; i++){ v[i]=0; } int ans,cr1,cr2; queue <int> q; for (int i=0; i<n; i++){ q.push(i); } while (ans!=(-1)){ cr1=tryCombination(v); for (int i=0; i<q.size(); i++){ int tm=q.front(); q.pop(); v[tm]=1; cr2=tryCombination(v); if (cr2==cr1){v[tm]=0;q.push(tm);} else{ if (cr2<cr1){v[tm]=0;d[tm]=cr2;break} if (cr1<cr2){d[tm]=cr1;break;} } } } answer(v,d); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:32:53: error: expected ';' before '}' token
   32 |                 if (cr2<cr1){v[tm]=0;d[tm]=cr2;break}
      |                                                     ^
      |                                                     ;