Submission #656840

#TimeUsernameProblemLanguageResultExecution timeMemory
656840happypotatoGondola (IOI14_gondola)C++17
10 / 100
9 ms980 KiB
#include "gondola.h" #include <bits/stdc++.h> using namespace std; int valid(int n, int inputSeq[]) { int seq[n]; for (int i = 0; i < n; i++) { seq[i] = (inputSeq[i] <= n ? inputSeq[i] : -1); } int samemod = -1; for (int i = 0; i < n; i++) { if (seq[i] == -1) continue; int curmod = (seq[i] + n - i) % n; if (samemod == -1) samemod = curmod; else if (samemod != curmod) return 0; } return 1; } //---------------------- int replacement(int n, int gondolaSeq[], int replacementSeq[]) { } //---------------------- int countReplacement(int n, int inputSeq[]) { }

Compilation message (stderr)

gondola.cpp: In function 'int replacement(int, int*, int*)':
gondola.cpp:26:1: warning: no return statement in function returning non-void [-Wreturn-type]
   26 | }
      | ^
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:33:1: warning: no return statement in function returning non-void [-Wreturn-type]
   33 | }
      | ^
#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...