(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 #1091438

#TimeUsernameProblemLanguageResultExecution timeMemory
1091438AlmontherCoins (IOI17_coins)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define suiii ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ll long long #define co cout<< //#pragma GCC optimize("O3,Ofast,unroll-loops") //#pragma GCC target("avx2,sse3,sse4,avx") using namespace std; //stuff int[] coin_flips(int []b, int c){ ll num=0; for(int i=0;i<63;i++){ if(b[i]) num^=i; } for(int i=0;i<63;i++){ if(num^i==c){ b[i]^=1; return b; } } } int find_coin(int[] b){ int ans=0; for(int i=0;i<63;i++){ if(b[i]) ans^=i; } return ans; }

Compilation message (stderr)

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