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 <bits/stdc++.h>
#include "coins.h"
using namespace std;
vector<int> coin_flips(vector<int> b, int c) {
vector<int> flips(1);
if(c==0) {
if(!(b[0]^b[1])) {
if(b[0]==1 && b[1]==1) {
flips[0]=1;
} else {
flips[0]=0;
}
} else {
if(b[0]==1 && b[1]==0) {
flips[0]=0;
} else {
flips[0]=1;
}
}
} else {
if(!(b[0]^b[1])) {
if(b[0]==1) {
flips[0]=0;
} else {
flips[0]=1;
}
} else {
if(b[0]==1&&b[1]==0) {
flips[0]=1;
} else {
flips[0]=0;
}
}
}
return flips;
}
int find_coin(vector<int> b) {
int x=b[0],y=b[1];
if(!(x^y)) {
if(x==1) {
return 1;
} else {
return 0;
}
} else {
if(x==1 && y==0) {
return 0;
} else {
return 1;
}
}
}
# | 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... |