Submission #807846

# Submission time Handle Problem Language Result Execution time Memory
807846 2023-08-05T03:05:32 Z OrazB Gondola (IOI14_gondola) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define ll long long int
#define pii pair <int, int>
#define pb push_back
#define ff first
#define ss second

const int N = 1e5+5;

int valid(int n, int A[]){
	int pos = -1;
	for (int i = 0; i < n; i++){
		if (A[i] <= n){pos = i; break;}
	}
	if (pos == -1) return 1;
	int x = A[pos];
	for (int i = pos; i < n; i++){
		if (A[i] <= n and A[i] != x) return 0;
		x++;
		if (x == n+1) x = 1;
	}
	return 1;
}

// int main ()
// {
// 	ios::sync_with_stdio(false);
// 	cin.tie(0);
// 	cin >> t;
// 	while (t--){
		
// 	}
// }	

Compilation message

/usr/bin/ld: /tmp/ccs2z4Ym.o: in function `main':
grader.cpp:(.text.startup+0xb6): undefined reference to `valid'
/usr/bin/ld: grader.cpp:(.text.startup+0x108): undefined reference to `countReplacement'
/usr/bin/ld: grader.cpp:(.text.startup+0x132): undefined reference to `replacement'
collect2: error: ld returned 1 exit status