제출 #301199

#제출 시각아이디문제언어결과실행 시간메모리
301199phillipCoins (IOI17_coins)C++14
0 / 100
4 ms1280 KiB
#include "coins.h" #include <bits/stdc++.h> #define ll long long using namespace std; vector<int> coin_flips(vector<int> b, int c) { vector<int> flips; for(int i=0,j=1;j<=c;j*=2,i++) { if(j&c) { if(b[i]==0){flips.push_back(i);b[i]=1-b[i];} } else { if(b[i]==1){flips.push_back(i);b[i]=1-b[i];} } }/* for(int i=0;i<8;i++) { for(int j=0;j<8;j++)cout<<b[i*8+j];cout<<"\n"; }*/ return flips; } int find_coin(vector<int> b) { int ret=0; for(int i=0,j=1;i<8;i++,j*=2) { if(b[i])ret+=j; } //cout<<ret<<" "; return ret; }
#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...