QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#761172#9739. 盒子syhhh1WA 0ms3532kbC++14360b2024-11-18 21:17:562024-11-18 21:17:57

Judging History

This is the latest submission verdict.

  • [2024-11-18 21:17:57]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3532kb
  • [2024-11-18 21:17:56]
  • Submitted

answer

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

#define int long long 

signed main()
{
	int z,h,u0,v0,u1,v1;
	cin>>z>>h>>u0>>v0>>u1>>v1;
	int  q;
	cin>>q;
	while(q--)
	{
		int x,y,z1;
		cin>>x>>y>>z1;
		if(x>=min(u0,u1)&&x<=max(u0,u1)&&y>=max(v0,v1)&&y<=max(v0,v1)&&z1>=z&&z1<=z+h)cout<<"YES"<<endl;
		else cout<<"NO"<<endl;
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3532kb

input:

1 1 -1 -1 1 1
3
-1 -1 1
0 0 2
1 2 2

output:

NO
NO
NO

result:

wrong answer expected YES, found NO [1st token]