Submission #918661

#TimeUsernameProblemLanguageResultExecution timeMemory
918661vjudge1Coins (IOI17_coins)C++17
100 / 100
9 ms1632 KiB
#include <bits/stdc++.h> #include "coins.h" #define pb push_back #define pii pair<int, int> #define pll pair<ll, ll> #define vll vector<ll> #define all(v) v.begin(), v.end() #define whole(a) a+1, a+1+n #define OPT ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define sec second #define fi first #define print(k) cerr << "Ans : "; cout << k << endl; #define ins insert #define pb push_back #define bpc __builtin_popcountll #define skip continue #define endll '\n' #define gcd(a, b) __gcd(a, b) #define lcm(a, b) a*b / (__gcd(a, b)) #define mpr make_pair #define rep(i,l,r) for(ll i=l;i<=r;++i) #define new '\n' typedef long long ll; typedef unsigned long long ull; const int mod = 998244353; const int sz = 3e5+5; using namespace std; int dx[4] = {1,0,-1,0}; int dy[4] = {0,1,0,-1}; vector <int> coin_flips(vector<int> b,int c) { int x = 0; for(int i = 0; i < 64; ++i) { if(b[i]) { x ^= i; } } x ^= c; vector<int>flips(1); flips[0] = x; return flips; } int find_coin(vector<int> b) { int x = 0; for(int i = 0; i < 64; ++i) { if(b[i]) { x ^= i; } } return x; }
#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...