Submission #250590

#TimeUsernameProblemLanguageResultExecution timeMemory
250590aloo123Coins (IOI17_coins)C++14
0 / 100
8 ms1568 KiB
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <random> #include <ratio> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> #include <climits> #include<coins.h> // #define ll long long #define ld long double #define mp make_pair #define pb push_back #define in insert #define vll vector<ll> #define endl "\n" #define pll pair<ll,ll> #define f first #define s second #define FOR(i,a,b) for(int i=(a),_b=(b); i<=_b; i++) // #define int ll #define sz(x) (ll)x.size() #define all(x) (x.begin(),x.end()) using namespace std; // const ll INF = 1e12; // const ll N =(1e5+5); // TODO : change value as per problem // const ll MOD = 1e9; std::vector<int> coin_flips(std::vector<int> b, int c) { int x = 0; for(int i = 0;i<64;i++){ x ^= b[i]; } if(x == 0) { // even number of 1s vector<int> v; v.pb(c); return v; } else{ // odd number of 1s vector<int> v; v.pb(c ^ x); return v; } } int find_coin(std::vector<int> b) { int x =0; for(int i =0;i<64;i++) x ^= b[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...