ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#212225 | #3811. T1 | one_zero_four_zero | 0 | 1067ms | 1284kb | C++11 | 986b | 2024-10-13 15:21:02 | 2024-10-13 19:35:19 |
answer
#include<bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
struct node{
int a, b;
bool operator < (const node &aaaa) const{
return a < aaaa.b;
}
};
int T;
int opt, d, a, b;
set<node> s[2];
int main(){
#ifndef ONLINE_JUDGE
freopen("data.in", "r", stdin);
freopen("data.out", "w", stdout);
#endif
scanf("%d", &T);
while (T --){
cout << "--------------\n";
scanf("%d %d %d %d", &opt, &d, &a, &b);
cout << opt << " " << d << " " << a << " " << b << "[][][][]\n";
if (opt == 1){
s[d].insert({a, b});
}else{
cout << (s[d].find({a, b}) == s[d].end()) << ";;\n";
s[d].erase({a, b});
}
if (s[0].empty() || s[1].empty()){
printf("-1\n");
continue;
}
int ans = 0x7f7f7f7f;
for (auto && i : s[0]){
for (auto && j : s[1]){
cout << i.a << " " << i.b << " " << j.a << " " << j.b << " ;;\n";
ans = min(max(i.a + j.a, i.b + j.b), ans);
}
}
printf("%d\n", ans);
}
return 0;
}
Details
小提示:点击横条可展开更详细的信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 3ms
memory: 1280kb
input:
100 1 0 30056910 791979446 0 0 30056910 791979446 1 1 87818006 915325879 1 0 885405412 638527154 0 1...
output:
-------------- 1 0 30056910 791979446[][][][] -1 -------------- 0 0 30056910 791979446[][][][] 1;; -...
result:
wrong output format Expected integer, but "--------------" found
Subtask #2:
score: 0
Wrong Answer
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 1280kb
input:
100 1 0 888145469 920169409 1 0 452904566 455699108 1 0 9314511 72429163 0 0 452904566 455699108 1 1...
output:
-------------- 1 0 888145469 920169409[][][][] -1 -------------- 1 0 452904566 455699108[][][][] -1 ...
result:
wrong output format Expected integer, but "--------------" found
Subtask #3:
score: 0
Wrong Answer
Test #3:
score: 0
Wrong Answer
time: 328ms
memory: 1284kb
input:
1000 1 0 434052041 886975755 1 0 5735137 42531708 1 0 333067530 62734547 0 0 434052041 886975755 1 1...
output:
-------------- 1 0 434052041 886975755[][][][] -1 -------------- 1 0 5735137 42531708[][][][] -1 ---...
result:
wrong output format Expected integer, but "--------------" found
Subtask #4:
score: 0
Wrong Answer
Test #4:
score: 0
Wrong Answer
time: 343ms
memory: 1284kb
input:
1000 1 1 99608765 102738517 1 0 409526489 651778959 1 1 632469167 447766999 1 1 596595729 295223176 ...
output:
-------------- 1 1 99608765 102738517[][][][] -1 -------------- 1 0 409526489 651778959[][][][] 4095...
result:
wrong output format Expected integer, but "--------------" found
Subtask #5:
score: 0
Wrong Answer
Test #5:
score: 0
Wrong Answer
time: 393ms
memory: 1280kb
input:
1000 1 1 392884476 341683390 1 1 812391583 884023296 0 1 392884476 341683390 0 1 812391583 884023296...
output:
-------------- 1 1 392884476 341683390[][][][] -1 -------------- 1 1 812391583 884023296[][][][] -1 ...
result:
wrong output format Expected integer, but "--------------" found
Subtask #6:
score: 0
Output Limit Exceeded
Test #6:
score: 0
Output Limit Exceeded
input:
200000 1 0 745208991 893565181 1 1 338915529 332862800 1 1 879402360 343669571 0 0 745208991 8935651...
output:
-------------- 1 0 745208991 893565181[][][][] -1 -------------- 1 1 338915529 332862800[][][][] 745...
result:
Subtask #7:
score: 0
Output Limit Exceeded
Test #7:
score: 0
Output Limit Exceeded
input:
200000 1 0 61288090 442363511 1 0 702180888 491607485 0 0 702180888 491607485 0 0 61288090 442363511...
output:
-------------- 1 0 61288090 442363511[][][][] -1 -------------- 1 0 702180888 491607485[][][][] -1 -...
result:
Subtask #8:
score: 0
Output Limit Exceeded
Test #8:
score: 0
Output Limit Exceeded
input:
200000 1 0 965089945 885763418 1 0 47734550 558904612 0 0 47734550 558904612 1 0 511007140 115554736...
output:
-------------- 1 0 965089945 885763418[][][][] -1 -------------- 1 0 47734550 558904612[][][][] -1 -...
result:
Subtask #9:
score: 0
Output Limit Exceeded
Test #9:
score: 0
Output Limit Exceeded
input:
1000000 1 1 598963903 48224788 1 0 880787238 21153517 1 0 874812562 609964051 0 1 598963903 48224788...
output:
-------------- 1 1 598963903 48224788[][][][] -1 -------------- 1 0 880787238 21153517[][][][] 88078...
result:
Subtask #10:
score: 0
Output Limit Exceeded
Test #10:
score: 0
Output Limit Exceeded
input:
1000000 1 0 532848699 733617288 1 1 59884418 599409867 0 1 59884418 599409867 1 0 1137393 496603003 ...
output:
-------------- 1 0 532848699 733617288[][][][] -1 -------------- 1 1 59884418 599409867[][][][] 5328...