Submission #675384

#TimeUsernameProblemLanguageResultExecution timeMemory
675384m23022002Coins (IOI17_coins)C++14
Compilation error
0 ms0 KiB
#include "coins.h"
#include<bits/stdc++.h>
using namespace std;
int cu;
vector<int> coin_flips(int[] b, int c){
  vector<int>ans(1);
  ans[0] = 0;
  cu = c;
  return ans;
}
 
int find_coin(int[] b)
{
  return cu;
}

Compilation message (stderr)

coins.cpp:5:30: error: expected ',' or '...' before 'b'
    5 | vector<int> coin_flips(int[] b, int c){
      |                              ^
coins.cpp: In function 'std::vector<int> coin_flips(int*)':
coins.cpp:8:8: error: 'c' was not declared in this scope; did you mean 'cu'?
    8 |   cu = c;
      |        ^
      |        cu
coins.cpp: At global scope:
coins.cpp:12:21: error: expected ',' or '...' before 'b'
   12 | int find_coin(int[] b)
      |                     ^