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

#TimeUsernameProblemLanguageResultExecution timeMemory
159471InfiniteJestCoins (IOI17_coins)C++14
Compilation error
0 ms0 KiB
#include <iostream> #include <fstream> #include <vector> #include <queue> #include <algorithm> #include <math.h> #include <map> #define pb push_back #define mp make_pair #define fi first #define se second using namespace std; ifstream in("input.txt"); ofstream out("output.txt"); typedef long long ll; int[] coin_flips(int[] b, int c){ int a[64]; for(int i=0;i<10;i++){ if(c&(1<<(9-i)))a[i]=1; else a[i]=0; } return a; } int find_coin(int[] b){ int num=0; for(int i=0;i<10;i++){ if(b[i]==1)num+=pow(2,9-i); } }

Compilation message (stderr)

coins.cpp:19:4: warning: decomposition declaration only available with -std=c++1z or -std=gnu++1z
 int[] coin_flips(int[] b, int c){
    ^
coins.cpp:19:4: error: decomposition declaration cannot be declared with type 'int'
 int[] coin_flips(int[] b, int c){
    ^~
coins.cpp:19:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
coins.cpp:19:4: error: empty decomposition declaration
coins.cpp:19:7: error: expected initializer before 'coin_flips'
 int[] coin_flips(int[] b, int c){
       ^~~~~~~~~~
coins.cpp:28:21: error: expected ',' or '...' before 'b'
 int find_coin(int[] b){
                     ^
coins.cpp: In function 'int find_coin(int*)':
coins.cpp:31:8: error: 'b' was not declared in this scope
     if(b[i]==1)num+=pow(2,9-i);
        ^
coins.cpp:33:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^