# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1038170 | Hanksburger | Coins (IOI17_coins) | C++17 | 1 ms | 1052 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"
#include <bits/stdc++.h>
using namespace std;
vector<int> coin_flips(vector<int> b, int c)
{
int s=0, t=0;
for (int i=0; i<64; i++)
s+=b[i], t+=i*b[i];
for (int i=0; i<64; i++)
if (((1-(s+1-b[i]*2)%4/2*2)*(t+(1-b[i]*2)*i)+6400)%64==c)
{
vector<int> tmp;
tmp.push_back(i);
return tmp;
}
}
int find_coin(vector<int> b)
{
int s=0, t=0;
for (int i=0; i<64; i++)
s+=b[i], t+=i*b[i];
return ((1-s%4/2*2)*t+6400)%64;
}
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... |