Submission #1298418

#TimeUsernameProblemLanguageResultExecution timeMemory
1298418gesp3011v2Cave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include "cave.h"
#include <bits/stdc++.h>
using namespace std;

void exploreCave(int N){
int a[N],b[N];
iota(b.begin(),b.end(),0);
memset(a,0,sizeof a);
do{
    int ans=tryCombination(a);
    if(ans==-1)break;
    a[res]=1;
}while(1);
answer(a,b);
}

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:7:8: error: request for member 'begin' in 'b', which is of non-class type 'int [N]'
    7 | iota(b.begin(),b.end(),0);
      |        ^~~~~
cave.cpp:7:18: error: request for member 'end' in 'b', which is of non-class type 'int [N]'
    7 | iota(b.begin(),b.end(),0);
      |                  ^~~
cave.cpp:12:7: error: 'res' was not declared in this scope
   12 |     a[res]=1;
      |       ^~~