Submission #465822

#TimeUsernameProblemLanguageResultExecution timeMemory
465822MohamedFaresNebiliHandcrafted Gift (IOI20_gift)C++14
Compilation error
0 ms0 KiB
#include "gift.h" #include <bits/stdc++.h> using namespace std; int construct(int n, int r, std::vector<int> a, std::vector<int> b, std::vector<int> x) { string s=""; char c='R'; bool f=true; for(int l=0;l<n;l++) { s=s+c; if(c=='R') c='B'; else c='R'; } for(int l=0;l<r&&f;l++) { int x=a[l], y=b[l]; if(x==y) f=false; } if(used) { craft(s); return 1; } return 0; }

Compilation message (stderr)

gift.cpp: In function 'int construct(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
gift.cpp:17:8: error: 'used' was not declared in this scope
   17 |     if(used) { craft(s); return 1; }
      |        ^~~~