Submission #586947

#TimeUsernameProblemLanguageResultExecution timeMemory
586947krit3379Gondola (IOI14_gondola)C++17
10 / 100
11 ms1108 KiB
#include<bits/stdc++.h> using namespace std; #include "gondola.h" #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #define N 100005 int valid(int n, int a[]){ int i,mod=1e9; for(i=0;i<n;i++){ if(a[i]>n)continue; if(mod==1e9)mod=(i-a[i]+n)%n; else if(mod!=(i-a[i]+n)%n)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:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
   21 | }
      | ^
gondola.cpp: In function 'int countReplacement(int, int*)':
gondola.cpp:25:1: warning: no return statement in function returning non-void [-Wreturn-type]
   25 | }
      | ^
#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...