Submission #1172551
Source Code Expand
#include<cstdio> #include <iostream> #include<algorithm> #include<string> #include<queue> #include<vector> #include<functional> #include<cmath> #include<map> #include<stack> #include<set> #include<numeric> #define rep(i,n) for(int i=0; i<int(n); i++) using namespace std; typedef long long ll; typedef pair<int, int>P; int A[100010]; int d[100010]; int main() { int N; cin >> N; for (int i = 0; i < N; i++) { cin >> A[i]; } int ans = 0; for (int i = 0; i < N; i++) { int sum = 0; for (int j = i + 1; j < N; j++) { if(A[0] != N) if (A[i] > A[j])sum++; } ans = max(sum, ans); } cout << ans+1 << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - ディスコ社内ツアー |
User | jj |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 679 Byte |
Status | WA |
Exec Time | 2103 ms |
Memory | 640 KB |
Judge Result
Set Name | Sample | Small | Permutation | All | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 20 | 0 / 10 | 0 / 70 | ||||||||||||||||||
Status |
|
|
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 00_example_04.txt |
Small | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 00_example_04.txt, 10_rand_01.txt, 10_rand_02.txt, 10_rand_03.txt, 10_rand_04.txt, 10_rand_05.txt, 10_rand_06.txt, 10_rand_07.txt, 10_rand_08.txt, 20_perm_01.txt, 20_perm_02.txt, 20_perm_03.txt, 20_perm_04.txt, 20_perm_05.txt, 20_perm_06.txt, 20_perm_07.txt, 20_perm_08.txt, 30_hand_01.txt, 30_hand_02.txt, 30_hand_03.txt, 30_hand_04.txt, 30_hand_05.txt, 30_hand_06.txt |
Permutation | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 20_perm_01.txt, 20_perm_02.txt, 20_perm_03.txt, 20_perm_04.txt, 20_perm_05.txt, 20_perm_06.txt, 20_perm_07.txt, 20_perm_08.txt, 30_hand_01.txt, 30_hand_02.txt, 60_perm_01.txt, 60_perm_02.txt, 60_perm_03.txt, 60_perm_04.txt, 60_perm_05.txt, 60_perm_06.txt, 60_perm_07.txt, 60_perm_08.txt, 70_hand_01.txt, 70_hand_02.txt |
All | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 00_example_04.txt, 10_rand_01.txt, 10_rand_02.txt, 10_rand_03.txt, 10_rand_04.txt, 10_rand_05.txt, 10_rand_06.txt, 10_rand_07.txt, 10_rand_08.txt, 20_perm_01.txt, 20_perm_02.txt, 20_perm_03.txt, 20_perm_04.txt, 20_perm_05.txt, 20_perm_06.txt, 20_perm_07.txt, 20_perm_08.txt, 30_hand_01.txt, 30_hand_02.txt, 30_hand_03.txt, 30_hand_04.txt, 30_hand_05.txt, 30_hand_06.txt, 50_rand_01.txt, 50_rand_02.txt, 50_rand_03.txt, 50_rand_04.txt, 50_rand_05.txt, 50_rand_06.txt, 50_rand_07.txt, 50_rand_08.txt, 60_perm_01.txt, 60_perm_02.txt, 60_perm_03.txt, 60_perm_04.txt, 60_perm_05.txt, 60_perm_06.txt, 60_perm_07.txt, 60_perm_08.txt, 70_hand_01.txt, 70_hand_02.txt, 70_hand_03.txt, 70_hand_04.txt, 70_hand_05.txt, 70_hand_06.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | AC | 1 ms | 256 KB |
00_example_02.txt | AC | 1 ms | 256 KB |
00_example_03.txt | AC | 1 ms | 256 KB |
00_example_04.txt | AC | 1 ms | 256 KB |
10_rand_01.txt | WA | 1 ms | 256 KB |
10_rand_02.txt | WA | 1 ms | 256 KB |
10_rand_03.txt | WA | 1 ms | 256 KB |
10_rand_04.txt | WA | 1 ms | 256 KB |
10_rand_05.txt | WA | 1 ms | 256 KB |
10_rand_06.txt | WA | 1 ms | 256 KB |
10_rand_07.txt | WA | 1 ms | 256 KB |
10_rand_08.txt | WA | 1 ms | 256 KB |
20_perm_01.txt | WA | 1 ms | 256 KB |
20_perm_02.txt | WA | 1 ms | 256 KB |
20_perm_03.txt | WA | 1 ms | 256 KB |
20_perm_04.txt | WA | 1 ms | 256 KB |
20_perm_05.txt | WA | 1 ms | 256 KB |
20_perm_06.txt | WA | 1 ms | 256 KB |
20_perm_07.txt | WA | 1 ms | 256 KB |
20_perm_08.txt | WA | 1 ms | 256 KB |
30_hand_01.txt | AC | 1 ms | 256 KB |
30_hand_02.txt | WA | 1 ms | 256 KB |
30_hand_03.txt | AC | 1 ms | 256 KB |
30_hand_04.txt | WA | 1 ms | 256 KB |
30_hand_05.txt | WA | 1 ms | 256 KB |
30_hand_06.txt | WA | 1 ms | 256 KB |
50_rand_01.txt | WA | 634 ms | 384 KB |
50_rand_02.txt | TLE | 2103 ms | 512 KB |
50_rand_03.txt | TLE | 2103 ms | 512 KB |
50_rand_04.txt | WA | 1463 ms | 512 KB |
50_rand_05.txt | WA | 242 ms | 384 KB |
50_rand_06.txt | WA | 1 ms | 256 KB |
50_rand_07.txt | WA | 61 ms | 256 KB |
50_rand_08.txt | WA | 1517 ms | 512 KB |
60_perm_01.txt | WA | 636 ms | 384 KB |
60_perm_02.txt | TLE | 2103 ms | 512 KB |
60_perm_03.txt | TLE | 2103 ms | 512 KB |
60_perm_04.txt | WA | 1468 ms | 512 KB |
60_perm_05.txt | WA | 243 ms | 384 KB |
60_perm_06.txt | WA | 1 ms | 256 KB |
60_perm_07.txt | WA | 62 ms | 256 KB |
60_perm_08.txt | WA | 1513 ms | 512 KB |
70_hand_01.txt | TLE | 2103 ms | 640 KB |
70_hand_02.txt | TLE | 2103 ms | 640 KB |
70_hand_03.txt | TLE | 2103 ms | 640 KB |
70_hand_04.txt | TLE | 2103 ms | 640 KB |
70_hand_05.txt | TLE | 2103 ms | 640 KB |
70_hand_06.txt | TLE | 2103 ms | 640 KB |