# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
127781 | 2019-07-10T06:04:46 Z | 송준혁(#3112) | AAQQZ (JOI15_aaqqz) | C++14 | 8 ms | 376 KB |
#include <bits/stdc++.h> using namespace std; int N; int ans; int A[110], B[110]; int main(){ scanf("%d %*d", &N); for (int i=1; i<=N; i++) scanf("%d", &A[i]); for (int i=1; i<=N; i++) for (int j=i; j<=N; j++){ for (int k=1; k<=N; k++) B[k] = A[k]; sort(B+i+1, B+j+1); for (int k=1; k<=N; k++) for (int l=k; l<=N; l++){ bool tf = true; for (int x=k; x<=l; x++) if (B[x] != B[l-x+k]){ tf = false; break; } if (tf) ans = max(ans, l-k+1); } } printf("%d\n", ans); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 376 KB | Output is correct |
2 | Correct | 6 ms | 376 KB | Output is correct |
3 | Correct | 6 ms | 376 KB | Output is correct |
4 | Correct | 6 ms | 256 KB | Output is correct |
5 | Correct | 6 ms | 376 KB | Output is correct |
6 | Incorrect | 8 ms | 376 KB | Output isn't correct |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 376 KB | Output is correct |
2 | Correct | 6 ms | 376 KB | Output is correct |
3 | Correct | 6 ms | 376 KB | Output is correct |
4 | Correct | 6 ms | 256 KB | Output is correct |
5 | Correct | 6 ms | 376 KB | Output is correct |
6 | Incorrect | 8 ms | 376 KB | Output isn't correct |
7 | Halted | 0 ms | 0 KB | - |