제출 #656839

#제출 시각아이디문제언어결과실행 시간메모리
656839happypotato곤돌라 (IOI14_gondola)C++17
10 / 100
7 ms1444 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] - i) % n; if (curmod < 0) curmod += 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[]) { }

컴파일 시 표준 에러 (stderr) 메시지

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