Submission #1141405

#TimeUsernameProblemLanguageResultExecution timeMemory
1141405aarb_.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(x[0] != x[1]){ return r; }else{ r[0] = 0; return; } }else{ if(x[0] == x[1]){ return r; }else{ r[0] = 0; return r; } } return r; } int find_coin(vector<int> b){ if(b[0] != b[1]){ return 1; }else{ return 0; } }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:14:13: error: return-statement with no value, in function returning 'std::vector<int>' [-fpermissive]
   14 |             return;
      |             ^~~~~~