Submission #991059

#TimeUsernameProblemLanguageResultExecution timeMemory
991059messiuuuuuCoins (IOI17_coins)C++14
0 / 100
5 ms1688 KiB
#include "coins.h" std::vector<int> coin_flips(std::vector<int> b, int c) { int cnt = 0; for (int i = 0; i < 2; i++) { if (b[i]) cnt++; } if (c == 1) { if (cnt == 1) b[2] = 1 - b[2]; else b[1] = 1 - b[1]; } else { if (cnt == 1) b[1] = 1 - b[1]; else b[2] = 1 - b[2]; } return b; } int find_coin(std::vector<int> b) { int cnt = 0; for (int i = 0; i < 2; i++) { if (b[i]) cnt++; } if (cnt == 1) return 1; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...