# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
918665 | ayankarimova | Coins (IOI17_coins) | C++14 | 7 ms | 1496 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "coins.h"
using namespace std;
vector<int> coin_flips(vector<int> b, int c) {
vector<int> flips(1);
if(b[0]==0 && b[1]==1 && c==0){
flips[0]=1;
}
if(b[0]==0 && b[1]==1 && c==1){
flips[0]=0;
}
if(b[0]==1 && b[1]==0 && c==0){
flips[0]=0;
}
if(b[0]==1 && b[1]==0 && c==1){
flips[0]=1;
}
if(b[0]==0 && b[1]==0 && c==0){
flips[0]=0;
}
if(b[0]==0 && b[1]==0 && c==1){
flips[0]=1;
}
if(b[0]==1 && b[1]==1 && c==0){
flips[0]=1;
}
if(b[0]==1 && b[1]==1 && c==1){
flips[0]=0;
}
return flips;
}
int find_coin(vector<int> b) {
if(b[0]==0 && b[1]==0) return 0;
if(b[0]==1 && b[1]==1) return 1;
if(b[0]==0 && b[1]==1) return 1;
if(b[0]==1 && b[1]==0) return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |