Submission #320329

#TimeUsernameProblemLanguageResultExecution timeMemory
320329lifchrsCoins (IOI17_coins)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef double db; typedef string str; typedef pair<ll,ll> pl; typedef vector<ll> vl; typedef vector<vl> vvl; #define mp make_pair #define se second #define pb push_back #define pf push_front #define nn <<"\n" #define F0R(i,a) for(ll i=0;i<a;i++) #define FOR(i,a,b) for(ll i=a;i<b;i++) int[] coin_flips(int[] b, int c){ b[0] = c; return b; } int find_coin(int[] b){ return b[0]; }

Compilation message (stderr)

coins.cpp:18:4: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   18 | int[] coin_flips(int[] b, int c){
      |    ^
coins.cpp:18:4: error: structured binding declaration cannot have type 'int'
   18 | int[] coin_flips(int[] b, int c){
      |    ^~
coins.cpp:18:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
coins.cpp:18:4: error: empty structured binding declaration
coins.cpp:18:7: error: expected initializer before 'coin_flips'
   18 | int[] coin_flips(int[] b, int c){
      |       ^~~~~~~~~~
coins.cpp:23:21: error: expected ',' or '...' before 'b'
   23 | int find_coin(int[] b){
      |                     ^
coins.cpp: In function 'int find_coin(int*)':
coins.cpp:24:12: error: 'b' was not declared in this scope; did you mean 'db'?
   24 |     return b[0];
      |            ^
      |            db