Submission #319119

#TimeUsernameProblemLanguageResultExecution timeMemory
319119daringtriflesGondola (IOI14_gondola)C++17
Compilation error
0 ms0 KiB
//control+option+n to run! #include <bits/stdc++.h> #include "gondola.h" using namespace std; #define pb push_back #define ll long long #define pll pair<ll, ll> #define FOR(i, a, b) for (signed long long i = (signed long long)(a); i < (signed long long)(b); i++) #define NEGFOR(i, a, b) for (ll i = (a); i > (b); i--) #define vll vector<long long> #define sll set<long long> #define ld long double #define inf 1000000000000000000 #define mll multiset<long long> #define vpll vector<pll> #define nn << "\n" #define ss << " " #define F(i, b) for (ll i = 0; i < b; i++) int valid(int n, int inputSeq[]){ ll mi=inf, curr=0; FOR(i,0,n){ if(mi>inputSeq[i]){ curr=i; } mi=min(mi,(ll)inputSeq[i]); } ll past=mi-1; FOR(i,curr,curr+n){ if (past+1==inputSeq[i%n]){ past++; } else return 0; } return 1; } //---------------------- int replacement(int n, int gondolaSeq[], int replacementSeq[]) { return -2; } //---------------------- int countReplacement(int n, int inputSeq[]) { return -3; } int main(){ int n; cin>>n; int x[n]; FOR(i,0,n) cin>>x[i]; cout<<valid (n,x); }

Compilation message (stderr)

/tmp/ccUULFQ3.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccaOo6Sb.o:gondola.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status