Submission #131397

#TimeUsernameProblemLanguageResultExecution timeMemory
131397DodgeBallManGondola (IOI14_gondola)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "gondola.h" using namespace std; int valid( int n, int num[] ) { unordered_map<int,int> m; int st = 0; for( int i = 0 ; i < n ; i++ ) { if( m[num[i]] > 0 ) return 0; if( num[i] <= n && st == 0 ) st = num[i]; else if( num[i] <= n && st > 0 && st != num[i] ) return 0; if( st != 0 ) st = ( st % n ) + 1; } return 1; } int replacement( int n, int num[], int se[] ) { return se; } int countReplacement( int n, int num[] ) { return 0; }

Compilation message (stderr)

gondola.cpp: In function 'int replacement(int, int*, int*)':
gondola.cpp:19:12: error: invalid conversion from 'int*' to 'int' [-fpermissive]
     return se;
            ^~