제출 #320343

#제출 시각아이디문제언어결과실행 시간메모리
320343lifchrsCoins (IOI17_coins)C++14
0 / 100
10 ms1452 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef double db; typedef string str; typedef pair<ll,ll> pl; typedef vector<ll> vl; typedef vector<vl> vvl; #define mp make_pair #define se second #define pb push_back #define pf push_front #define nn <<"\n" #define F0R(i,a) for(ll i=0;i<a;i++) #define FOR(i,a,b) for(ll i=a;i<b;i++) vector<int> coin_flips(vector<int> b, int c){ vector<int> flips(64,0); string binary = bitset<16>(c).to_string(); ll currflip = 0; F0R(i,8){ if(binary[i] != b[i]){ flips[currflip] = i; currflip++; } } FOR(i,currflip,63) flips[i] = 63; return flips; } int find_coin(vector<int> b){ ll ans = 0; F0R(i,8){ ans += pow(2,i) * 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...