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;
std::vector<int> coin_flips(vector<int> b, int c) {
vector<int> ans;
int cnt = 0;
for (int i = 0; i < 2; i++) {
if (b[i]) cnt++;
}
if (c == 1) {
if (cnt == 1) ans.push_back(2);
else ans.push_back(1);
}
else {
if (cnt == 1) ans.push_back(1);
else ans.push_back(2);
}
return ans;
}
int find_coin(vector<int> b) {
int cnt = 0;
for (int i = 0; i < 2; i++) {
if (b[i]) cnt++;
}
if (cnt == 1) return 1;
return 0;
}
# | 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... |