Submission #298049

#TimeUsernameProblemLanguageResultExecution timeMemory
298049peti1234Gondola (IOI14_gondola)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "gondola.h" using namespace std; using ll=long long; ll mod=1e9, sum=1, n, kul=-1, f; ll hatv(ll a, ll b) { ll ans=1; while(b) { if (b%2) ans*=a, ans%=mod; a*=a, a%=mod; b/=2; } return ans; } bool valid(int w, int s[]) { n=w; for (int i=0; i<n; i++) if (s[i]<n) { f=(s[i]-i+n)%n; if (kul!=-1 && kul!=f) sum=0; kul=f; } return sum; } int replacement(int w, int s[], int v[]) { return 0; } int countReplacement(int w, int s[]) { return 0; }

Compilation message (stderr)

gondola.cpp:15:6: error: ambiguating new declaration of 'bool valid(int, int*)'
   15 | bool valid(int w, int s[]) {
      |      ^~~~~
In file included from gondola.cpp:2:
gondola.h:8:5: note: old declaration 'int valid(int, int*)'
    8 | int valid(int n, int inputSeq[]);
      |     ^~~~~