Submission #131396

#TimeUsernameProblemLanguageResultExecution timeMemory
131396DodgeBallManGondola (IOI14_gondola)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.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;
}

Compilation message (stderr)

/tmp/ccyOIQgI.o: In function `main':
grader.cpp:(.text.startup+0xc3): undefined reference to `countReplacement'
grader.cpp:(.text.startup+0xe2): undefined reference to `valid'
grader.cpp:(.text.startup+0x106): undefined reference to `replacement'
collect2: error: ld returned 1 exit status