QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#261454#6806. LandlordchengchWA 31ms3596kbC++17468b2023-11-22 21:52:062023-11-22 21:52:18

Judging History

你现在查看的是最新测评结果

  • [2023-11-22 21:52:18]
  • 评测
  • 测评结果:WA
  • 用时:31ms
  • 内存:3596kb
  • [2023-11-22 21:52:06]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;

int main(){
	int t;cin>>t;
	while(t--){
		int Ax1,Ay1,Ax2,Ay2;cin>>Ax1>>Ay1>>Ax2>>Ay2;
		int Bx1,By1,Bx2,By2;cin>>Bx1>>By1>>Bx2>>By2;
		if(Ax1==Bx1&&Ay1==By1&&Ax2==Bx2&&Ay2==By2){
			cout<<2<<endl;
		}else{
			int Lx=max(Ax1,Bx1),Rx=min(Ax2,Bx2);
			int Ly=max(Ay1,By1),Ry=min(Ay2,By2);
			if(Lx>Rx||Ly>Ry)cout<<3<<endl;
			else{
				if(Lx<Rx||Ly<Ry)cout<<4<<endl;
				else cout<<3<<endl;
			}
		}
	}
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3596kb

input:

3
0 0 1 1
2 2 3 4
1 0 3 2
0 1 2 3
0 0 1 1
0 0 1 1

output:

3
4
2

result:

ok 3 lines

Test #2:

score: -100
Wrong Answer
time: 31ms
memory: 3500kb

input:

10000
399413444 601729739 838979329 605646850
176742602 192902430 399413444 601729739
19226489 2915752 27806715 977516728
4075670 1872865 19226489 925008461
45547871 393001695 58201503 713825285
18241876 197851829 45547871 713825285
237513514 504913958 868997719 543598899
134432693 110279295 2375135...

output:

3
4
4
4
4
4
4
4
4
3
3
4
3
4
4
4
4
4
4
4
4
4
4
3
4
3
4
4
4
4
4
4
4
4
4
4
3
4
3
4
4
4
4
4
4
4
4
4
4
3
4
3
4
4
4
4
4
4
4
4
4
4
3
4
3
4
4
4
4
4
2
4
4
4
4
3
4
3
4
4
4
4
4
4
4
4
4
4
3
4
3
4
4
4
4
4
4
4
4
4
4
3
4
3
4
4
4
4
4
4
4
4
4
4
3
4
3
3
4
4
4
4
4
4
4
4
3
3
4
3
3
3
3
3
3
3
3
3
3
3
3
3
3
4
4
4
4
4
4
4
...

result:

wrong answer 2nd lines differ - expected: '3', found: '4'