Submission #252379

#TimeUsernameProblemLanguageResultExecution timeMemory
252379uacoder123Coins (IOI17_coins)C++14
Compilation error
0 ms0 KiB
#include "coins.h" #include <bits/stdc++.h> using namespace std; #define F first #define S second #define FOR(i,a,b) for (auto i = (a); i <= (b); ++i) #define NFOR(i,a,b) for(auto i = (a); i >= (b); --i) #define all(x) (x).begin(), (x).end() #define sz(x) int(x.size()) #define mp(i,a) make_pair(i,a) #define pb(a) push_back(a) #define bit(x,b) (x&(1LL<<b)) typedef long long int lli; typedef pair <lli,lli> ii; typedef pair <lli,ii> iii; typedef vector <int> vi; std::vector<int> coin_flips(std::vector<int> b, int c) { std::vector<int> flips(65); for(int i=0;i<65;++i) flip[i]=1; return flips; } int find_coin(std::vector<int> b) { if (b[0] == 0) { return 0; } return 7; }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:20:13: error: 'flip' was not declared in this scope
             flip[i]=1;
             ^~~~
coins.cpp:20:13: note: suggested alternative: 'flips'
             flip[i]=1;
             ^~~~
             flips