3901 | 2023-03-03 19:54:45 | kohumark | Mágikus táblázat | cpp17 | Wrong answer 0/100 | 583ms | 5400 KiB |
#include <iostream>
#include <vector>
using namespace std;
int main(){
cin.tie(0); ios_base::sync_with_stdio(false);
int n,m; cin >> n >> m;
int a[n]; int b[m];
for(int i=0; i<n; i++) cin >> a[i];
for(int i=0; i<m; i++) cin >> b[i];
vector<int> act; act.assign(m,0);
int l=0; int ma=1e9; int sol=0;
for(int i=0; i<n; i++){
for(int j=0; j<m; j++){
if(a[i]>=b[j]){
act[j]++; l++; ma=min(ma,act[j]);
sol=max(sol,ma*l);
}
else{act[j]=0;l=0;ma=1e9;}
}
}
cout << sol;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1828 KiB | ||||
2 | Accepted | 456ms | 2284 KiB | ||||
subtask2 | 0/14 | ||||||
3 | Wrong answer | 3ms | 2248 KiB | ||||
4 | Accepted | 3ms | 2460 KiB | ||||
5 | Wrong answer | 3ms | 2584 KiB | ||||
6 | Accepted | 3ms | 2796 KiB | ||||
7 | Accepted | 2ms | 2764 KiB | ||||
8 | Accepted | 3ms | 3040 KiB | ||||
subtask3 | 0/27 | ||||||
9 | Wrong answer | 8ms | 3128 KiB | ||||
10 | Wrong answer | 8ms | 3296 KiB | ||||
11 | Wrong answer | 8ms | 3308 KiB | ||||
12 | Accepted | 8ms | 3312 KiB | ||||
13 | Accepted | 4ms | 3300 KiB | ||||
14 | Accepted | 4ms | 3432 KiB | ||||
15 | Wrong answer | 7ms | 3444 KiB | ||||
16 | Wrong answer | 9ms | 3456 KiB | ||||
17 | Accepted | 7ms | 3524 KiB | ||||
subtask4 | 0/21 | ||||||
18 | Time limit exceeded | 569ms | 4024 KiB | ||||
19 | Time limit exceeded | 575ms | 4096 KiB | ||||
20 | Time limit exceeded | 564ms | 4372 KiB | ||||
21 | Time limit exceeded | 551ms | 4320 KiB | ||||
22 | Time limit exceeded | 560ms | 4280 KiB | ||||
23 | Time limit exceeded | 568ms | 4124 KiB | ||||
24 | Accepted | 6ms | 4316 KiB | ||||
subtask5 | 0/38 | ||||||
25 | Time limit exceeded | 580ms | 4596 KiB | ||||
26 | Time limit exceeded | 560ms | 4540 KiB | ||||
27 | Time limit exceeded | 575ms | 4480 KiB | ||||
28 | Time limit exceeded | 551ms | 4536 KiB | ||||
29 | Time limit exceeded | 560ms | 4872 KiB | ||||
30 | Time limit exceeded | 575ms | 4944 KiB | ||||
31 | Time limit exceeded | 551ms | 4952 KiB | ||||
32 | Time limit exceeded | 579ms | 4576 KiB | ||||
33 | Time limit exceeded | 560ms | 4656 KiB | ||||
34 | Time limit exceeded | 583ms | 4776 KiB | ||||
35 | Time limit exceeded | 560ms | 4652 KiB | ||||
36 | Time limit exceeded | 579ms | 5136 KiB | ||||
37 | Time limit exceeded | 579ms | 5076 KiB | ||||
38 | Time limit exceeded | 568ms | 5048 KiB | ||||
39 | Time limit exceeded | 547ms | 5060 KiB | ||||
40 | Time limit exceeded | 568ms | 5188 KiB | ||||
41 | Time limit exceeded | 568ms | 4924 KiB | ||||
42 | Time limit exceeded | 555ms | 5300 KiB | ||||
43 | Time limit exceeded | 552ms | 5400 KiB | ||||
44 | Time limit exceeded | 537ms | 5224 KiB |