제출 #571346

#제출 시각아이디문제언어결과실행 시간메모리
571346RandomLBCoins (IOI17_coins)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int[] coin_flips(int[] b, int c){ int xr = 0; for (int i = 0; i < 64; i++) if (b[i]) xr ^= i; b[c^xr] = 1-b[c^xr]; retrun b; } int find_coin(int b[64]){ int xr = 0; for (int i = 0; i < 64; i++) if (b[i]) xr ^= i; return xr; }

컴파일 시 표준 에러 (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){
      |       ^~~~~~~~~~