(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #252397

#TimeUsernameProblemLanguageResultExecution timeMemory
252397uacoder123Coins (IOI17_coins)C++14
100 / 100
16 ms1948 KiB
#include "coins.h" #include <bits/stdc++.h> using namespace std; #define F first #define S second #define FOR(i,a,b) for (auto i = (a); i <= (b); ++i) #define NFOR(i,a,b) for(auto i = (a); i >= (b); --i) #define all(x) (x).begin(), (x).end() #define sz(x) int(x.size()) #define mp(i,a) make_pair(i,a) #define pb(a) push_back(a) #define bit(x,b) (x&(1LL<<b)) typedef long long int lli; typedef pair <lli,lli> ii; typedef pair <lli,ii> iii; typedef vector <int> vi; std::vector<int> coin_flips(std::vector<int> b, int c) { std::vector<int> flip(1); int v=0; for(int i=0;i<64;++i) if(b[i]) v^=i; flip[0]=v^c; return flip; } int find_coin(std::vector<int> b) { int v=0; for(int i=0;i<64;++i) if(b[i]) v^=i; return(v); }

Compilation message (stderr)

coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:29:13: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
             for(int i=0;i<64;++i)
             ^~~
coins.cpp:32:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
                 return(v);
                 ^~~~~~
#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...