Submission #1141412

#TimeUsernameProblemLanguageResultExecution timeMemory
1141412aarb_.tomatexdCoins (IOI17_coins)C++20
Compilation error
0 ms0 KiB
#include "coins.h" #include <bits/stdc++.h> using namespace std; #define SZ(x) ((int)(x).size()) #define ll long long // c== 1, k== 1, vector<int>coin_flips(vector<int> x, int c){ vector<int> r(1); if(c==1){ if(b[0] == 1){ r[0] = 2; return r; }else{ r[0] = 0; return r; } }else{ if(b[0] == 0){ r[0] = 2; return r; }else{ r[0] = 0; return r; } } return r; } int find_coin(vector<int> b){ return b[0]; }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:10:12: error: 'b' was not declared in this scope
   10 |         if(b[0] == 1){
      |            ^
coins.cpp:18:12: error: 'b' was not declared in this scope
   18 |         if(b[0] == 0){
      |            ^