QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#664436 | #7155. Padel Prize Pursuit | Warinchai_s# | 27 | 30ms | 5972kb | C++14 | 687b | 2024-10-21 20:40:42 | 2024-10-21 20:40:42 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int cnt[200005];
int mx=0;
int id=0;
int ans[200005];
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
int n,m;cin>>n>>m;
vector<pair<int,int>>v;
for(int i=0;i<m;i++){
int a,b;cin>>a>>b;
v.push_back({a,b});
}
reverse(v.begin(),v.end());
for(int i=0;i<v.size();i++){
cnt[v[i].first]++;
if(cnt[v[i].first]>mx)mx=cnt[v[i].first],id=v[i].first;
else if(cnt[v[i].first]==mx){
id=min(id,v[i].first);
}
ans[id]++;
}
for(int i=0;i<n;i++){
cout<<ans[i]<<" ";
}
}
/*
3 4
0 1
2 0
1 2
2 1
*/
详细
Subtask #1:
score: 12
Accepted
Test #1:
score: 12
Accepted
time: 11ms
memory: 5208kb
input:
2 200000 0 1 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 0 1 1 0 0 1...
output:
114418 85582
result:
ok single line: '114418 85582 '
Test #2:
score: 12
Accepted
time: 15ms
memory: 5172kb
input:
2 200000 1 0 0 1 1 0 1 0 1 0 1 0 1 0 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 0 1 0 1 1 0 0 1 1 0 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0...
output:
78408 121592
result:
ok single line: '78408 121592 '
Test #3:
score: 12
Accepted
time: 0ms
memory: 3580kb
input:
2 1 1 0
output:
0 1
result:
ok single line: '0 1 '
Test #4:
score: 12
Accepted
time: 13ms
memory: 5348kb
input:
2 200000 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1...
output:
200000 0
result:
ok single line: '200000 0 '
Subtask #2:
score: 0
Wrong Answer
Test #5:
score: 0
Wrong Answer
time: 1ms
memory: 3736kb
input:
2000 2000 741 1153 839 1048 1159 445 196 1042 404 1319 638 766 1373 621 736 705 1579 1696 454 1566 1794 474 993 858 424 380 1971 210 1729 861 1450 1275 986 535 964 431 1371 1176 658 378 708 1669 1049 1236 832 533 16 450 675 1324 1680 1598 1936 885 579 307 987 1497 996 1589 1087 843 1303 222 105 1692...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 190 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 23 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
wrong answer 1st lines differ - expected: '0 2 0 4 1 0 5 0 2 2 1 0 0 1 0 ...2 0 2 4 0 1 3 2 1 0 2 1 2 2 3 0', found: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 '
Subtask #3:
score: 15
Accepted
Test #21:
score: 15
Accepted
time: 15ms
memory: 5300kb
input:
2 200000 0 1 1 0 1 0 1 0 0 1 1 0 0 1 1 0 1 0 0 1 0 1 1 0 0 1 0 1 1 0 0 1 1 0 0 1 0 1 0 1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 0 1 1 0 0 1...
output:
114418 85582
result:
ok single line: '114418 85582 '
Test #22:
score: 15
Accepted
time: 11ms
memory: 5284kb
input:
2 200000 1 0 0 1 1 0 1 0 1 0 1 0 1 0 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 0 1 0 1 1 0 0 1 1 0 0 1 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 0 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0...
output:
78408 121592
result:
ok single line: '78408 121592 '
Test #23:
score: 15
Accepted
time: 0ms
memory: 3880kb
input:
2 1 1 0
output:
0 1
result:
ok single line: '0 1 '
Test #24:
score: 15
Accepted
time: 8ms
memory: 5196kb
input:
2 200000 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1...
output:
200000 0
result:
ok single line: '200000 0 '
Test #25:
score: 15
Accepted
time: 29ms
memory: 5824kb
input:
200000 200000 127497 49844 33921 127497 33921 39859 33921 138631 166524 33921 190508 166524 190508 50999 190508 91282 190508 39858 192631 190508 192631 21222 192631 178212 192631 129337 192631 59888 192631 33496 192631 37457 156089 192631 156089 154380 64450 156089 55350 64450 47341 55350 47341 8049...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 '
Test #26:
score: 15
Accepted
time: 30ms
memory: 5284kb
input:
200000 200000 133112 5125 133112 5125 79440 133112 79440 5125 79440 133112 133112 79440 5125 133112 5125 133112 5125 133112 5125 79440 79440 5125 79440 133112 133112 79440 133112 79440 79440 133112 79440 133112 79440 133112 5125 79440 79440 5125 133112 79440 133112 5125 133112 79440 5125 133112 5125...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 '
Test #27:
score: 15
Accepted
time: 13ms
memory: 5208kb
input:
7 200000 5 1 5 2 6 5 6 4 6 2 6 5 6 1 6 2 6 4 3 6 0 3 0 1 0 5 3 0 4 3 3 4 3 2 3 2 1 3 1 4 1 4 1 4 1 0 6 1 3 6 6 3 6 5 3 6 0 3 6 0 2 6 2 5 2 6 6 2 5 6 3 5 1 3 1 4 5 1 5 0 5 2 1 5 1 3 1 5 1 3 1 5 2 1 1 2 1 6 1 5 1 6 1 4 1 5 1 5 1 4 1 0 5 1 6 5 6 3 2 6 5 2 6 5 3 6 5 3 2 5 1 2 1 5 1 4 1 5 0 1 0 2 1 0 1 3...
output:
16 405 85449 4712 108750 668 0
result:
ok single line: '16 405 85449 4712 108750 668 0 '
Test #28:
score: 15
Accepted
time: 29ms
memory: 5908kb
input:
200000 200000 74489 60570 12146 74489 147640 12146 147640 139747 147640 195253 147640 153200 147640 73107 117472 147640 117472 107736 117472 69487 117472 159686 10813 117472 57557 10813 99937 57557 22637 99937 44867 22637 44867 57861 117443 44867 62376 117443 62376 161363 108346 62376 108346 30335 1...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 '
Test #29:
score: 15
Accepted
time: 21ms
memory: 5820kb
input:
200000 200000 91584 138820 91584 152607 91584 194830 91584 194191 107799 91584 107799 5105 94528 107799 31145 94528 130122 31145 130122 125627 13275 130122 13275 75846 13275 139713 13275 88761 13275 141872 185293 13275 185293 98749 185293 149493 185293 159825 185293 108330 171531 185293 73688 171531...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok single line: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 '
Test #30:
score: 15
Accepted
time: 26ms
memory: 5972kb
input:
200000 199999 38963 164177 50862 38963 161216 50862 40786 161216 101295 40786 95756 101295 172936 95756 194407 172936 106240 194407 155843 106240 82989 155843 46308 82989 35380 46308 180666 35380 62373 180666 100648 62373 22679 100648 23941 22679 57908 23941 195841 57908 30559 195841 123952 30559 68...
output:
99029 0 0 58510 0 17566 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13996 0 0 0 0 0 0 7679 0 2250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok single line: '99029 0 0 58510 0 17566 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 '
Subtask #4:
score: 0
Wrong Answer
Test #31:
score: 0
Wrong Answer
time: 26ms
memory: 5856kb
input:
200000 200000 33870 101688 1598 78943 23260 47952 84769 196360 104405 172552 58448 113260 76500 80767 95836 53662 58671 55746 167974 83639 176177 32272 45361 115076 152875 160216 33361 176768 162031 181989 134541 80064 21681 167447 96707 196846 16036 34620 166990 179451 45201 65888 89903 93145 13742...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
wrong answer 1st lines differ - expected: '0 2 0 1 1 0 0 0 1 0 0 1 0 1 1 ...5 0 0 0 0 0 3 0 1 0 2 2 0 0 2 0', found: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 '
Subtask #5:
score: 0
Wrong Answer
Test #45:
score: 22
Accepted
time: 30ms
memory: 5796kb
input:
200000 199999 38963 164177 50862 38963 161216 50862 40786 161216 101295 40786 95756 101295 172936 95756 194407 172936 106240 194407 155843 106240 82989 155843 46308 82989 35380 46308 180666 35380 62373 180666 100648 62373 22679 100648 23941 22679 57908 23941 195841 57908 30559 195841 123952 30559 68...
output:
99029 0 0 58510 0 17566 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13996 0 0 0 0 0 0 7679 0 2250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok single line: '99029 0 0 58510 0 17566 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 '
Test #46:
score: 0
Wrong Answer
time: 30ms
memory: 5820kb
input:
200000 199999 71991 169488 146786 107854 28414 125380 84535 950 116408 20502 59780 93568 3641 125626 140641 95712 174416 52557 129197 67781 14945 189486 188533 142712 153256 9038 197250 143580 8468 27391 150740 116154 150633 128866 43920 163109 188350 24110 10621 41212 4843 154899 29633 29615 43347 ...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
wrong answer 1st lines differ - expected: '1 0 0 0 0 0 14 3 1 0 0 0 0 0 3...0 0 3 3 0 0 0 0 1 1 0 0 0 0 0 0', found: '0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 '
Subtask #6:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%