Submission #131400

#TimeUsernameProblemLanguageResultExecution timeMemory
131400DodgeBallManGondola (IOI14_gondola)C++14
20 / 100
28 ms4228 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; m[num[i]]++; } return 1; } int replacement( int n, int num[], int se[] ) { } int countReplacement( int n, int num[] ) { return 0; }

Compilation message (stderr)

gondola.cpp: In function 'int replacement(int, int*, int*)':
gondola.cpp:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...