# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
127768 |
2019-07-10T05:48:14 Z |
윤교준(#3110) |
AAQQZ (JOI15_aaqqz) |
C++14 |
|
7 ms |
456 KB |
#include <bits/stdc++.h>
using namespace std;
int A[55], B[55];
int N, K, Ans = 1;
bool f(int s, int e) {
for(; s < e; s++, e--)
if(B[s] != B[e])
return false;
return true;
}
int main() {
cin >> N >> K;
for(int i = 1; i <= N; i++) cin >> A[i];
for(int s = 1; s < N; s++) for(int e = s+1; e <= N; e++) {
memcpy(B, A, (N+1)<<2);
sort(B+s, B+e+1);
for(int i = 1; i < N; i++) for(int j = i+1; j <= N; j++)
if(Ans < j-i+1 && f(i, j))
Ans = j-i+1;
}
cout << Ans << endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
256 KB |
Output is correct |
2 |
Correct |
5 ms |
376 KB |
Output is correct |
3 |
Correct |
5 ms |
376 KB |
Output is correct |
4 |
Correct |
4 ms |
376 KB |
Output is correct |
5 |
Correct |
4 ms |
256 KB |
Output is correct |
6 |
Correct |
5 ms |
256 KB |
Output is correct |
7 |
Correct |
5 ms |
376 KB |
Output is correct |
8 |
Correct |
5 ms |
376 KB |
Output is correct |
9 |
Correct |
4 ms |
256 KB |
Output is correct |
10 |
Correct |
4 ms |
256 KB |
Output is correct |
11 |
Correct |
5 ms |
256 KB |
Output is correct |
12 |
Correct |
5 ms |
376 KB |
Output is correct |
13 |
Correct |
4 ms |
256 KB |
Output is correct |
14 |
Correct |
5 ms |
376 KB |
Output is correct |
15 |
Correct |
4 ms |
256 KB |
Output is correct |
16 |
Correct |
7 ms |
376 KB |
Output is correct |
17 |
Correct |
4 ms |
376 KB |
Output is correct |
18 |
Correct |
4 ms |
256 KB |
Output is correct |
19 |
Correct |
4 ms |
256 KB |
Output is correct |
20 |
Correct |
5 ms |
376 KB |
Output is correct |
21 |
Correct |
5 ms |
352 KB |
Output is correct |
22 |
Correct |
5 ms |
456 KB |
Output is correct |
23 |
Correct |
5 ms |
256 KB |
Output is correct |
24 |
Correct |
4 ms |
256 KB |
Output is correct |
25 |
Correct |
5 ms |
376 KB |
Output is correct |
26 |
Correct |
5 ms |
376 KB |
Output is correct |
27 |
Correct |
2 ms |
256 KB |
Output is correct |
28 |
Correct |
5 ms |
376 KB |
Output is correct |
29 |
Correct |
4 ms |
256 KB |
Output is correct |
30 |
Correct |
4 ms |
376 KB |
Output is correct |
31 |
Correct |
4 ms |
256 KB |
Output is correct |
32 |
Correct |
4 ms |
256 KB |
Output is correct |
33 |
Correct |
4 ms |
376 KB |
Output is correct |
34 |
Correct |
4 ms |
256 KB |
Output is correct |
35 |
Correct |
4 ms |
256 KB |
Output is correct |
36 |
Correct |
4 ms |
256 KB |
Output is correct |
37 |
Correct |
4 ms |
256 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
256 KB |
Output is correct |
2 |
Correct |
5 ms |
376 KB |
Output is correct |
3 |
Correct |
5 ms |
376 KB |
Output is correct |
4 |
Correct |
4 ms |
376 KB |
Output is correct |
5 |
Correct |
4 ms |
256 KB |
Output is correct |
6 |
Correct |
5 ms |
256 KB |
Output is correct |
7 |
Correct |
5 ms |
376 KB |
Output is correct |
8 |
Correct |
5 ms |
376 KB |
Output is correct |
9 |
Correct |
4 ms |
256 KB |
Output is correct |
10 |
Correct |
4 ms |
256 KB |
Output is correct |
11 |
Correct |
5 ms |
256 KB |
Output is correct |
12 |
Correct |
5 ms |
376 KB |
Output is correct |
13 |
Correct |
4 ms |
256 KB |
Output is correct |
14 |
Correct |
5 ms |
376 KB |
Output is correct |
15 |
Correct |
4 ms |
256 KB |
Output is correct |
16 |
Correct |
7 ms |
376 KB |
Output is correct |
17 |
Correct |
4 ms |
376 KB |
Output is correct |
18 |
Correct |
4 ms |
256 KB |
Output is correct |
19 |
Correct |
4 ms |
256 KB |
Output is correct |
20 |
Correct |
5 ms |
376 KB |
Output is correct |
21 |
Correct |
5 ms |
352 KB |
Output is correct |
22 |
Correct |
5 ms |
456 KB |
Output is correct |
23 |
Correct |
5 ms |
256 KB |
Output is correct |
24 |
Correct |
4 ms |
256 KB |
Output is correct |
25 |
Correct |
5 ms |
376 KB |
Output is correct |
26 |
Correct |
5 ms |
376 KB |
Output is correct |
27 |
Correct |
2 ms |
256 KB |
Output is correct |
28 |
Correct |
5 ms |
376 KB |
Output is correct |
29 |
Correct |
4 ms |
256 KB |
Output is correct |
30 |
Correct |
4 ms |
376 KB |
Output is correct |
31 |
Correct |
4 ms |
256 KB |
Output is correct |
32 |
Correct |
4 ms |
256 KB |
Output is correct |
33 |
Correct |
4 ms |
376 KB |
Output is correct |
34 |
Correct |
4 ms |
256 KB |
Output is correct |
35 |
Correct |
4 ms |
256 KB |
Output is correct |
36 |
Correct |
4 ms |
256 KB |
Output is correct |
37 |
Correct |
4 ms |
256 KB |
Output is correct |
38 |
Runtime error |
3 ms |
376 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
39 |
Halted |
0 ms |
0 KB |
- |