Submission #320351

#TimeUsernameProblemLanguageResultExecution timeMemory
320351lifchrsCoins (IOI17_coins)C++14
0 / 100
9 ms1452 KiB
#include <bits/stdc++.h> using namespace std; vector<int> coin_flips(vector<int> b, int c){ vector<int> flips(64,0); string binary = bitset<6>(c).to_string(); int currflip = 0; for(int i = 0; i < 6; i++){ if(binary[i] != b[i]){ flips[currflip] = i; currflip++; } } for(int i = currflip; i < 64; i++) flips[i] = 63; return flips; } int find_coin(vector<int> b){ int ans = 0; for(int i = 0; i < 6; i++){ ans += pow(2,5-i) * int(b[i]); } return ans; }
#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...