ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#207032 | #3727. 时间管理 | kevin0625 | 100 | 1155ms | 1200kb | C++11 | 443b | 2024-07-26 19:29:58 | 2024-07-26 21:49:07 |
answer
#include<bits/stdc++.h>
using namespace std;
int n,m,amax,amin=1000000100,bmax,bmin=1000000010;
int main()
{
cin>>n;
for(int i=1;i<=n;i++)
{
int a,b;
cin>>a>>b;
amax=max(amax,a);
amin=min(amin,b);
}
cin>>m;
for(int i=1;i<=m;i++)
{
int a,b;
cin>>a>>b;
bmax=max(bmax,a);
bmin=min(bmin,b);
}
if(amin>=bmax&&bmin>=bmin)
{
cout<<0;
return 0;
}
cout<<max(bmax-amin,amax-bmin);
return 0;
}
Details
小提示:点击横条可展开更详细的信息
Test #1:
score: 10
Accepted
time: 0ms
memory: 1200kb
input:
109 206677059 376432734 133116858 529029801 633338966 705754959 418160930 740104881 78559518 9323680...
output:
933116406
result:
ok 1 number(s): "933116406"
Test #2:
score: 10
Accepted
time: 0ms
memory: 1196kb
input:
125 854780588 965911719 117577397 449854780 160899010 732101553 566911800 964003638 231815015 518085...
output:
928076689
result:
ok 1 number(s): "928076689"
Test #3:
score: 10
Accepted
time: 1ms
memory: 1196kb
input:
1963 940674622 980687868 989399036 998085326 808244592 903940386 759749112 900007445 646324771 77365...
output:
979189067
result:
ok 1 number(s): "979189067"
Test #4:
score: 10
Accepted
time: 1ms
memory: 1196kb
input:
1592 430702262 671522123 83650876 124506997 185588580 619190060 743564779 763138077 108207270 340995...
output:
953968585
result:
ok 1 number(s): "953968585"
Test #5:
score: 10
Accepted
time: 2ms
memory: 1200kb
input:
1743 550819545 917273302 18914772 498690033 880115396 982843377 910812836 963909479 919727551 944846...
output:
963262150
result:
ok 1 number(s): "963262150"
Test #6:
score: 10
Accepted
time: 258ms
memory: 1196kb
input:
173355 988072888 996318215 845485646 907745073 285817937 945308738 999869573 999936831 414164584 912...
output:
999871809
result:
ok 1 number(s): "999871809"
Test #7:
score: 10
Accepted
time: 252ms
memory: 1196kb
input:
186228 960755359 966756311 909077524 968761343 380461384 568056273 743779004 796247577 616108713 990...
output:
996414995
result:
ok 1 number(s): "996414995"
Test #8:
score: 10
Accepted
time: 194ms
memory: 1200kb
input:
106458 596618319 822463884 407086313 683341872 153369993 508909328 764942766 873034940 738165372 891...
output:
998706843
result:
ok 1 number(s): "998706843"
Test #9:
score: 10
Accepted
time: 210ms
memory: 1200kb
input:
156387 737422159 768831872 419237515 985144593 862952879 961848079 158339192 160312227 586588965 951...
output:
996457327
result:
ok 1 number(s): "996457327"
Test #10:
score: 10
Accepted
time: 237ms
memory: 1196kb
input:
173357 416902075 484625579 913151248 952980410 803158999 867001297 875357531 876151234 327150669 701...
output:
997997310
result:
ok 1 number(s): "997997310"