QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#751632#9739. 盒子xdz_#AC ✓1ms3716kbC++20685b2024-11-15 19:54:452024-11-15 19:54:45

Judging History

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

  • [2024-11-15 19:54:45]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3716kb
  • [2024-11-15 19:54:45]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define fi first
#define se second
#define endl '\n'

typedef pair<int,int> PII;

void solve(){
	int z0,h,u0,v0,u1,v1;
	cin >>z0>>h>>u0>>v0>>u1>>v1;
	int min1 = z0,max1 = z0 + h;
	int min2 = min(u0,u1),max2 = max(u0,u1);
	int min3 = min(v0,v1),max3 = max(v0,v1);
	int q;
	cin >>q;
	while(q --){
		int x,y,z;
		cin >>x>>y>>z;
		if(x >= min2 && x <= max2 && y >= min3 && y <= max3 && z >= min1 && z <= max1){
			cout<<"YES"<<'\n';
		}
		else cout<<"NO"<<'\n';
	}
}

signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	int T;
	T = 1;
	while(T --){
		solve();
	}
}

这程序好像有点Bug,我给组数据试试?

詳細信息

Test #1:

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

input:

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

output:

YES
YES
NO

result:

ok 3 token(s): yes count is 2, no count is 1

Test #2:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

0 0 0 0 0 0
1
0 0 0

output:

YES

result:

ok YES

Test #3:

score: 0
Accepted
time: 1ms
memory: 3648kb

input:

350432 492023 -396022 -414507 -384948 -709370
1000
-130226 -670854 277087
566180 93150 527328
-204228 -72535 242125
-614762 564337 -801184
223424 -916504 -284025
749863 555219 232927
-127805 10830 871265
510696 -444465 52713
313445 -731187 -723316
-917838 537750 294727
532132 -19501 346654
-632699 -...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
...

result:

ok 1000 token(s): yes count is 0, no count is 1000

Test #4:

score: 0
Accepted
time: 1ms
memory: 3668kb

input:

228503 520839 -998939 648838 301020 -634344
1000
-51454 763171 -95843
-188171 -950717 -549267
-820616 222672 830557
294338 -499633 -837648
641515 624958 954660
958085 -348021 600965
-342912 7553 357975
882334 976349 300816
-773525 667743 -455881
-281685 -62054 -906946
437055 985148 92827
-556692 -76...

output:

NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO...

result:

ok 1000 token(s): yes count is 98, no count is 902

Test #5:

score: 0
Accepted
time: 1ms
memory: 3664kb

input:

32576 550340 -665078 -385892 -984641 503905
1000
-909460 -767954 -468772
-942522 970565 443843
562998 -615047 551914
-796564 -430676 160741
-940395 -770358 164974
-833694 -314484 -65849
-558019 871351 879536
-746029 -596358 -416230
167877 -870105 846406
424172 303291 954604
-594801 -975353 -230704
5...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO...

result:

ok 1000 token(s): yes count is 18, no count is 982

Test #6:

score: 0
Accepted
time: 1ms
memory: 3588kb

input:

910648 542843 -233144 677452 -368375 607302
1000
232536 -368781 123447
-662021 891847 430472
981462 645310 203568
112535 505355 -938946
512548 -194044 -596342
437751 -280947 302189
261726 -264851 -598904
562387 -140692 866726
46056 528825 177063
95176 -394588 787782
-591804 29296 -484531
588841 -137...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
...

result:

ok 1000 token(s): yes count is 1, no count is 999

Test #7:

score: 0
Accepted
time: 1ms
memory: 3712kb

input:

751720 572344 198791 705945 -717259 682328
1000
-653841 100096 -249483
-451222 -152021 388729
-669778 -192409 -173149
993263 504609 -975410
930639 410641 -322805
645972 -247409 -364625
983397 598947 887806
934025 216899 149680
987459 990977 514201
801032 -994392 -385521
376342 40425 226790
664848 -2...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
...

result:

ok 1000 token(s): yes count is 3, no count is 997

Test #8:

score: 0
Accepted
time: 1ms
memory: 3716kb

input:

0 823342 -453786 323011 353987 -476308
1000
-772517 219356 0
-779674 81929 400022
320696 806617 0
894837 -86120 -470245
913573 555340 416205
325991 198144 -677553
-82340 -545989 813513
734862 355887 0
598874 657260 478825
299374 765520 0
-442169 221528 -535862
-489636 143998 -222742
729237 707902 24...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
...

result:

ok 1000 token(s): yes count is 80, no count is 920

Test #9:

score: 0
Accepted
time: 1ms
memory: 3644kb

input:

823342 0 -453786 323011 353987 -476308
1000
-772517 219356 823342
-779674 81929 400022
320696 806617 823342
894837 -86120 -470245
913573 555340 416205
325991 198144 -677553
-82340 -545989 813513
734862 355887 823342
598874 657260 478825
299374 765520 823342
-442169 221528 -535862
-489636 143998 -222...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO...

result:

ok 1000 token(s): yes count is 36, no count is 964

Test #10:

score: 0
Accepted
time: 1ms
memory: 3652kb

input:

0 1000000 -1000000 -1000000 1000000 1000000
1000
-663813 -453786 323011
353987 -476308 -772517
219356 372568 -779674
81929 695999 400022
320696 806617 643519
894837 -86120 275273
-470245 913573 555340
-894026 416205 325991
198144 -711695 -677553
-82340 -545989 -297070
813513 734862 355887
786595 598...

output:

YES
NO
NO
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
NO
NO
YES
YES
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
NO
YES
YES
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
YES
NO
NO
NO
YES
NO
NO
YES
YES
NO
YES
NO
YES
NO
YES
NO
YES
YES
NO
YES
NO
NO
NO
YES
YES
NO
YES
YES
YES
NO
YES
YES
N...

result:

ok 1000 token(s): yes count is 521, no count is 479

Test #11:

score: 0
Accepted
time: 1ms
memory: 3668kb

input:

1000000 1000000 -1000000 -1000000 1000000 1000000
1000
-663813 -453786 353987
-476308 -772517 372568
-779674 81929 400022
320696 806617 1000000
894837 -86120 -470245
913573 555340 416205
325991 198144 -677553
-82340 -545989 813513
734862 355887 1000000
598874 657260 478825
299374 765520 1000000
-442...

output:

NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
YES
YES
NO
YES
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
YES
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
YES
NO
NO
NO
NO
NO
N...

result:

ok 1000 token(s): yes count is 262, no count is 738

Test #12:

score: 0
Accepted
time: 1ms
memory: 3704kb

input:

823342 0 -453786 323011 -453786 323011
1000
-453786 -772517 823342
-453786 323011 695999
-453786 806617 823342
-86120 -470245 823342
-453786 323011 325991
-453786 -677553 -545989
813513 323011 823342
-453786 323011 -825560
299374 90638 221528
-535862 323011 823342
-222742 323011 823342
-453786 32301...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
YES
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO...

result:

ok 1000 token(s): yes count is 128, no count is 872

Test #13:

score: 0
Accepted
time: 1ms
memory: 3636kb

input:

0 1000000 -1000000 -1000000 1000000 1000000
1000
-453786 353987 -772517
372568 1000000 400022
806617 1000000 275273
913573 -1000000 325991
-711695 -82340 -297070
734862 -1000000 657260
478825 765520 1000000
-947824 -489636 1000000
729237 803557 299303
-161956 558380 1000000
-1000000 1000000 -1000000...

output:

NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
NO
NO
YES
NO
NO
YES
NO
YES
NO
NO
NO
YES
NO
NO
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
YES
NO
YES
NO
NO
YES
NO
NO
YES
NO
YES
YES
NO
YES
YES
NO
NO
YES
NO
YES
YES
NO
NO
YES
YES
NO
NO
NO
YES
NO
NO
YES
YES
NO
NO
NO
YES
NO
NO
NO
YES
NO
NO
NO
N...

result:

ok 1000 token(s): yes count is 481, no count is 519

Extra Test:

score: 0
Extra Test Passed