Submission #44517

#TimeUsernameProblemLanguageResultExecution timeMemory
44517MatheusLealVCoins (IOI17_coins)C++17
0 / 100
12 ms1456 KiB
#include <bits/stdc++.h> #include "coins.h" using namespace std; vector<int> v; vector<int> coin_flips(vector<int> a, int x) { int ini = 0, fim = 63, mid; for(int k = 0; k < 8; k++) { mid = (ini + fim)/2; if( x >= mid) { a[mid] = 1; ini = mid; } else { a[mid] = 0; fim = mid - 1; } } return a; } int find_coin(vector<int> a) { int ini = 0, fim = 63, mid; for(int cnt = 0; cnt < 100; cnt ++) { mid = (ini + fim)/2; if(a[mid]) ini = mid; else fim = mid - 1; } return mid; }
#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...