Submission #00049
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #include <bits/stdc++.h> using namespace std; #define int int64_t #define itn int #define fi first #define se second signed main() { cin.tie(0); ios::sync_with_stdio( false ); int n,ans=0,t; int a[100005]; map< int , int > q; vector< int > v; vector< int > d; cin>>n; for ( int i=0;i<n;i++){ cin>>a[i]; q[a[i]]++; d.push_back((a[i])); if (q[a[i]]==1) v.push_back(a[i]); } sort(v.begin(),v.end()); for ( int i=0;i<v.size();i++){ int e; t=0,e=0; vector< int > w; for ( int j=0;j<d.size();j++){ if (v[i]<d[j]) w.push_back(d[j]); else e++; } d.clear(); //cout<<q[i]<<" "; for ( int j=0;j<w.size();j++){ //d.push_back(w[j]); //cout<<w[i]<<" "; } d=w; //cout<<"\n"; //cout<<ans<<" "<<e<<"\n"; ans=max(ans,e); } cout<<ans<< "\n" ; return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0004 - 日本沈没 (Japan Sinks) |
ユーザー名 | ei1941 |
投稿日時 | 2020-12-08 17:39:16 |
言語 | C++17 |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 880 Byte |
最大実行時間 | 2000 ms |
最大メモリ使用量 | 11168 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | Subtask1 | 0 / 7 | 01-*.txt |
2 | Subtask2 | 0 / 8 | 0[12]-*.txt |
3 | Subtask | 0 / 85 | 0[123]-*.txt |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # | ||
---|---|---|---|---|---|---|
01-01.txt | AC | 24 ms | 472 KB |
1
|
2
|
3
|
01-02.txt | AC | 26 ms | 416 KB |
1
|
2
|
3
|
01-03.txt | WA | 17 ms | 500 KB |
1
|
2
|
3
|
01-04.txt | WA | 28 ms | 564 KB |
1
|
2
|
3
|
01-05.txt | WA | 21 ms | 592 KB |
1
|
2
|
3
|
01-06.txt | WA | 23 ms | 588 KB |
1
|
2
|
3
|
01-07.txt | WA | 31 ms | 584 KB |
1
|
2
|
3
|
01-08.txt | WA | 28 ms | 496 KB |
1
|
2
|
3
|
01-09.txt | AC | 29 ms | 776 KB |
1
|
2
|
3
|
01-10.txt | AC | 26 ms | 772 KB |
1
|
2
|
3
|
01-11.txt | AC | 21 ms | 640 KB |
1
|
2
|
3
|
01-12.txt | WA | 15 ms | 540 KB |
1
|
2
|
3
|
01-13.txt | WA | 25 ms | 564 KB |
1
|
2
|
3
|
01-14.txt | WA | 25 ms | 568 KB |
1
|
2
|
3
|
01-15.txt | WA | 14 ms | 564 KB |
1
|
2
|
3
|
01-16.txt | WA | 24 ms | 716 KB |
1
|
2
|
3
|
02-01.txt | AC | 14 ms | 588 KB |
2
|
3
|
|
02-02.txt | AC | 25 ms | 540 KB |
2
|
3
|
|
02-03.txt | WA | 21 ms | 616 KB |
2
|
3
|
|
02-04.txt | WA | 20 ms | 804 KB |
2
|
3
|
|
02-05.txt | AC | 19 ms | 672 KB |
2
|
3
|
|
02-06.txt | WA | 25 ms | 700 KB |
2
|
3
|
|
02-07.txt | WA | 21 ms | 724 KB |
2
|
3
|
|
02-08.txt | WA | 20 ms | 748 KB |
2
|
3
|
|
02-09.txt | WA | 19 ms | 756 KB |
2
|
3
|
|
02-10.txt | WA | 22 ms | 752 KB |
2
|
3
|
|
03-01.txt | WA | 193 ms | 1796 KB |
3
|
||
03-02.txt | WA | 28 ms | 2228 KB |
3
|
||
03-03.txt | WA | 27 ms | 3036 KB |
3
|
||
03-04.txt | WA | 38 ms | 3768 KB |
3
|
||
03-05.txt | WA | 63 ms | 3936 KB |
3
|
||
03-06.txt | WA | 346 ms | 4100 KB |
3
|
||
03-07.txt | TLE | 2000 ms | 4760 KB |
3
|
||
03-08.txt | TLE | 2000 ms | 8540 KB |
3
|
||
03-09.txt | TLE | 2000 ms | 11112 KB |
3
|
||
03-10.txt | TLE | 2000 ms | 11084 KB |
3
|
||
03-11.txt | TLE | 2000 ms | 11148 KB |
3
|
||
03-12.txt | AC | 33 ms | 3248 KB |
3
|
||
03-13.txt | WA | 35 ms | 2388 KB |
3
|
||
03-14.txt | WA | 28 ms | 3200 KB |
3
|
||
03-15.txt | WA | 33 ms | 3932 KB |
3
|
||
03-16.txt | WA | 63 ms | 4164 KB |
3
|
||
03-17.txt | WA | 358 ms | 4168 KB |
3
|
||
03-18.txt | TLE | 2000 ms | 4840 KB |
3
|
||
03-19.txt | TLE | 2000 ms | 8660 KB |
3
|
||
03-20.txt | TLE | 2000 ms | 11168 KB |
3
|
||
sample-01.txt | AC | 16 ms | 540 KB | |||
sample-02.txt | AC | 28 ms | 620 KB | |||
sample-03.txt | AC | 21 ms | 696 KB |