# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1141404 | x93bd0 | Coins (IOI17_coins) | C++20 | 0 ms | 0 KiB |
/*
x93bd0 - trying not to go down
Rust is better, >:
*/
#include <algorithm>
#include <csignal>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <map>
#include <set>
#include <list>
#include <queue>
#include <sys/types.h>
#include <vector>
#include <bitset>
#include "coins.h"
using namespace std;
#define int long long
#define uint unsigned int
#define iinf LLONG_MAX
#define uinf ULLONG_MAX
vector<int> coin_flips(vector<int> b, int c) {
vector<int> o;
for (uint x = 0; x < 6; x++) {
if (b[x] != (c & 1)) {
o.push_back(x);
}
c >>= 1;
}
return o;
}
int find_coin(vector<int> b) {
uint o = 0;
for (uint x = 6; x > 0; x--) {
o <<= 1;
o |= b[x] > 0;
}
return o;
}