| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1308869 | thnhann | Coins (IOI17_coins) | C++20 | 0 ms | 0 KiB |
#include <iostream>
#include <string>
#include <bits/stdc++.h>
#define int long long
using namespace std;
int[] coin_flips(int[] b, int c)
{
int filp[1];
flip[0] = 4;
if(c == 0)
{
if(b[0] == 1 && b[2] == 1)
flip[0] = 2;
}
if(c == 1)
{
if(b[0] == 1 && b[2] == 1)
{
if(b[1] == 0)
flip[0] = 1;
}
if(b[0] == 1 && b[2] == 0)
flip[0] = 0;
if(b[0] == 0 && b[2] == 1)
flip[0] = 2;
}
if(c == 2)
{
if(b[0] == 1 && b[2] == 1)
flip[0] = 0;
}
}
int find_coin(int[] b)
{
int c;
if(b[0] == 1 && b[2] == 0) return 0;
if(b[0] == 0 && b[2] == 1) return 2;
return 1;
}
