제출 #648015

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

컴파일 시 표준 에러 (stderr) 메시지

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