(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #1092651

#TimeUsernameProblemLanguageResultExecution timeMemory
1092651SulACoins (IOI17_coins)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int[] coin_flips(int[] b, int c) { for (int i = 0; i < 64; i++) if (b[i]) c ^= i; int a[1] = { c }; return a; } int find_coin(int[] b) { int c = 0; for (int i = 0; i < 64; i++) if (b[i]) c ^= i; return c; }

Compilation message (stderr)

coins.cpp:4:4: error: structured binding declaration cannot have type 'int'
    4 | int[] coin_flips(int[] b, int c) {
      |    ^~
coins.cpp:4:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
coins.cpp:4:4: error: empty structured binding declaration
coins.cpp:4:7: error: expected initializer before 'coin_flips'
    4 | int[] coin_flips(int[] b, int c) {
      |       ^~~~~~~~~~
coins.cpp:10:21: error: expected ',' or '...' before 'b'
   10 | int find_coin(int[] b) {
      |                     ^
coins.cpp: In function 'int find_coin(int*)':
coins.cpp:12:38: error: 'b' was not declared in this scope
   12 |     for (int i = 0; i < 64; i++) if (b[i]) c ^= i;
      |                                      ^