| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1355858 | avahw | Coins (IOI17_coins) | C++20 | 4 ms | 580 KiB |
#include "coins.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> coin_flips(std::vector<int> b, int c) {
std::vector<int> flips;
for(int i = 0; i < 8; i++){
for(int j = 0; j < 8; j++){
int ind = i * 8 + j;
if(ind == c && b[ind] != 1) flips.push_back(ind);
if(b[ind] == 1 && ind != c) flips.push_back(ind);
}
}
if(flips.size() == 0){
flips.push_back(0);
flips.push_back(0);
}
return flips;
}
int find_coin(std::vector<int> b) {
for(int i = 0; i < 8; i++){
for(int j = 0; j < 8; j++){
if(b[i * 8 + j] == 1) return (i * 8) + j;
}
}
return 42;
}
Compilation message (stderr)
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
