QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#86901#1212. NavigationExplodingKonjac20 26ms12108kbC++17714b2023-03-11 14:36:512023-03-11 14:36:55

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-11 14:36:55]
  • 评测
  • 测评结果:20
  • 用时:26ms
  • 内存:12108kb
  • [2023-03-11 14:36:51]
  • 提交

Anna

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

namespace Anna_
{

vector<int> g[200005];
void dfs(int u,int x,int fa=0)
{
	Flag(u,x);
	for(auto &v: g[u])
	{
		if(v==fa) continue;
		int w=(u<v);
		dfs(v,x^w,u);
	}
}

} // namespace Anna_

void Anna(int subtask,int n,int T,int U[],int V[])
{
	using namespace Anna_;
	for(int i=0;i<n-1;i++)
	{
		g[U[i]].push_back(V[i]);
		g[V[i]].push_back(U[i]);
	}
	dfs(T,0);
}

Bruno

#include "Brunolib.h"

namespace Bruno_
{


} // namespace Bruno_

void Bruno(int subtask,int S,int F,int L,int P[],int Q[])
{
	using namespace Bruno_;
	for(int i=0;i<L;i++)
		if((P[i]<S)==(F^Q[i]))
			return Answer(P[i]);
	Answer(-1);
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 10
Accepted
time: 26ms
memory: 11444kb

input:

100000 94560 16294 1
91913 94560
94560 69503
94560 39684
47595 94560
94560 96623
8011 94560
94560 15498
94560 92403
94560 84183
94560 44035
39994 94560
82975 94560
94560 30698
94560 17596
93175 94560
12253 94560
94560 60807
94560 16111
35848 94560
94560 19061
94560 25435
64721 94560
94560 79086
9548...

output:

1 94560 1 99999
91913 69503 39684 47595 96623 8011 15498 92403 84183 44035 39994 82975 30698 17596 93175 12253 60807 16111 35848 19061 25435 64721 79086 95487 98059 93865 84074 47584 77418 15271 82666 57858 21726 62847 90603 40247 64714 59668 13698 15586 58276 57618 20231 16177 77966 44363 69669 679...

input:

1 94560 1 99999
91913 69503 39684 47595 96623 8011 15498 92403 84183 44035 39994 82975 30698 17596 93175 12253 60807 16111 35848 19061 25435 64721 79086 95487 98059 93865 84074 47584 77418 15271 82666 57858 21726 62847 90603 40247 64714 59668 13698 15586 58276 57618 20231 16177 77966 44363 69669 679...

output:

16294

result:

ok 

Test #2:

score: 0
Wrong Answer
time: 10ms
memory: 11416kb

input:

100000 48333 48333 1
927 22305
87188 22305
22305 75567
22305 9347
22305 35901
84454 22305
22305 5403
95165 22305
22305 24449
22305 69669
67307 22305
22305 58710
22305 27193
22305 24006
22305 8159
22305 54726
22305 92239
22305 68605
10968 22305
98683 22305
22305 53333
56288 22305
22305 68487
22305 24...

output:

1 48333 0 1
22305 
0 

input:

1 48333 0 1
22305 
0 

output:

-1

result:

wrong answer Wrong Answer [5]

Subtask #2:

score: 0
Wrong Answer

Test #26:

score: 15
Accepted
time: 24ms
memory: 11936kb

input:

100000 57165 10261 2
57165 48992
57165 19387
71033 57165
13350 57165
52013 57165
39911 57165
31569 57165
57165 57655
47865 57165
57165 61895
79639 57165
35978 57165
47454 57165
76859 57165
57165 45447
31140 57165
57165 67169
57165 95791
57165 60405
57165 80905
57165 55354
57165 95642
8667 57165
8827...

output:

2 57165 1 99999
48992 19387 71033 13350 52013 39911 31569 57655 47865 61895 79639 35978 47454 76859 45447 31140 67169 95791 60405 80905 55354 95642 8667 88274 721 61541 31467 62158 93646 5791 37673 90967 70822 50373 6922 9211 12493 55791 99612 86337 52418 27225 13284 54010 57405 99213 36389 5528 532...

input:

2 57165 1 99999
48992 19387 71033 13350 52013 39911 31569 57655 47865 61895 79639 35978 47454 76859 45447 31140 67169 95791 60405 80905 55354 95642 8667 88274 721 61541 31467 62158 93646 5791 37673 90967 70822 50373 6922 9211 12493 55791 99612 86337 52418 27225 13284 54010 57405 99213 36389 5528 532...

output:

10261

result:

ok 

Test #27:

score: 0
Wrong Answer
time: 4ms
memory: 10904kb

input:

100000 20690 20690 2
97025 11592
8829 11592
11592 95625
11592 30832
11592 71951
11592 59839
11592 58624
65454 11592
46862 11592
86426 11592
11592 2542
11592 43812
59361 11592
11592 89769
84488 11592
11592 97510
77985 11592
11592 74093
20808 11592
22285 11592
11592 78659
11592 69395
51936 11592
10374...

output:

2 20690 0 1
11592 
0 

input:

2 20690 0 1
11592 
0 

output:

-1

result:

wrong answer Wrong Answer [5]

Subtask #3:

score: 20
Accepted

Test #53:

score: 20
Accepted
time: 4ms
memory: 11508kb

input:

5 4 1 3
2 4
3 4
5 4
4 1

output:

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

input:

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

output:

1

result:

ok 

Test #54:

score: 20
Accepted
time: 8ms
memory: 10928kb

input:

5 5 3 3
1 4
4 3
5 4
2 4

output:

3 5 0 1
4 
1 

input:

3 5 0 1
4 
1 

output:

4

result:

ok 

Test #55:

score: 20
Accepted
time: 10ms
memory: 11648kb

input:

5 2 4 3
4 1
3 4
4 5
2 4

output:

3 2 0 1
4 
0 

input:

3 2 0 1
4 
0 

output:

4

result:

ok 

Test #56:

score: 20
Accepted
time: 12ms
memory: 11916kb

input:

50000 34879 23464 3
34879 15963
18721 34879
34879 10106
18364 34879
34879 23006
15487 34879
48356 34879
29325 34879
49428 34879
34879 33232
34879 11053
25243 34879
1729 34879
28816 34879
34879 28832
6766 34879
38567 34879
16292 34879
34879 12983
34879 39259
34879 12547
38228 34879
10922 34879
35635 ...

output:

3 34879 1 49999
15963 18721 10106 18364 23006 15487 48356 29325 49428 33232 11053 25243 1729 28816 28832 6766 38567 16292 12983 39259 12547 38228 10922 35635 35095 29959 12379 32853 14075 47835 35673 37166 32219 26253 17599 2709 46140 16178 29606 48367 20875 30557 37853 306 48005 19363 12031 26274 9...

input:

3 34879 1 49999
15963 18721 10106 18364 23006 15487 48356 29325 49428 33232 11053 25243 1729 28816 28832 6766 38567 16292 12983 39259 12547 38228 10922 35635 35095 29959 12379 32853 14075 47835 35673 37166 32219 26253 17599 2709 46140 16178 29606 48367 20875 30557 37853 306 48005 19363 12031 26274 9...

output:

23464

result:

ok 

Test #57:

score: 20
Accepted
time: 2ms
memory: 10452kb

input:

50000 23915 16691 3
5730 47713
5730 30001
5730 37173
5730 48062
5730 47318
25627 5730
38604 5730
5554 5730
28931 5730
5730 4971
8248 5730
2646 5730
5611 5730
42980 5730
5730 11640
5730 5440
15681 5730
41594 5730
5730 3925
24489 5730
28880 5730
5730 22654
5730 40596
5730 42786
35298 5730
33116 5730
5...

output:

3 23915 1 1
5730 
0 

input:

3 23915 1 1
5730 
0 

output:

5730

result:

ok 

Test #58:

score: 20
Accepted
time: 8ms
memory: 11444kb

input:

50000 21541 21500 3
21500 28433
40076 21500
21500 44511
23826 21500
38374 21500
13185 21500
33217 21500
21500 29688
21500 41527
21500 36460
46072 21500
21500 3314
49915 21500
21500 111
25720 21500
7768 21500
48085 21500
38431 21500
44557 21500
41668 21500
21500 44992
21500 6887
21500 20065
21500 222...

output:

3 21541 1 1
21500 
0 

input:

3 21541 1 1
21500 
0 

output:

21500

result:

ok 

Test #59:

score: 20
Accepted
time: 0ms
memory: 11232kb

input:

50000 46350 23808 3
41775 4812
41775 25985
7373 41775
41775 21281
34476 41775
29680 41775
41775 31678
41775 45771
41775 7651
15726 41775
23964 41775
5022 41775
41775 35007
43947 41775
41775 7035
41775 40944
41775 7621
41775 24012
38543 41775
23389 41775
41775 5274
41775 16534
41775 29419
16250 41775...

output:

3 46350 0 1
41775 
1 

input:

3 46350 0 1
41775 
1 

output:

41775

result:

ok 

Test #60:

score: 20
Accepted
time: 2ms
memory: 10244kb

input:

8 8 2 3
1 2
8 2
5 6
1 3
4 5
5 1
2 7

output:

3 8 1 1
2 
0 

input:

3 8 1 1
2 
0 

output:

2

result:

ok 

Test #61:

score: 20
Accepted
time: 8ms
memory: 11128kb

input:

8 2 4 3
5 2
1 6
2 8
3 1
5 1
5 7
4 2

output:

3 2 0 3
5 8 4 
1 1 0 

input:

3 2 0 3
5 8 4 
1 1 0 

output:

4

result:

ok 

Test #62:

score: 20
Accepted
time: 8ms
memory: 11064kb

input:

8 4 5 3
5 6
6 3
4 3
7 3
2 6
5 1
8 5

output:

3 4 0 1
3 
1 

input:

3 4 0 1
3 
1 

output:

3

result:

ok 

Test #63:

score: 20
Accepted
time: 0ms
memory: 11204kb

input:

8 2 5 3
4 3
2 7
2 1
6 2
3 7
7 8
5 3

output:

3 2 1 3
7 1 6 
1 1 0 

input:

3 2 1 3
7 1 6 
1 1 0 

output:

7

result:

ok 

Test #64:

score: 20
Accepted
time: 0ms
memory: 11588kb

input:

8 2 7 3
7 8
8 1
2 5
6 4
5 3
4 8
5 4

output:

3 2 0 1
5 
0 

input:

3 2 0 1
5 
0 

output:

5

result:

ok 

Test #65:

score: 20
Accepted
time: 8ms
memory: 11396kb

input:

99998 87386 58198 3
85465 2972
82055 13745
90944 2989
22869 2304
83782 38621
75141 77939
16283 28026
37731 94249
69186 67502
32120 24562
13030 45973
51269 5775
71907 93802
43291 61040
31976 48691
86121 90698
67358 96244
25898 5756
92398 19735
68317 57405
85257 19812
37326 11401
27210 8208
90462 2661...

output:

3 87386 1 1
58198 
0 

input:

3 87386 1 1
58198 
0 

output:

58198

result:

ok 

Test #66:

score: 20
Accepted
time: 8ms
memory: 12100kb

input:

99998 97510 72855 3
84732 41538
54532 86688
55775 44754
92474 21130
99372 64772
75367 98020
13008 63796
65345 89495
9008 13825
33954 87101
43847 80979
10344 91037
77587 75389
82456 72826
89024 65686
4341 62555
8148 54141
30503 2594
70755 74647
19061 81455
46427 6657
87560 318
54163 78148
99060 77195...

output:

3 97510 0 1
73397 
1 

input:

3 97510 0 1
73397 
1 

output:

73397

result:

ok 

Test #67:

score: 20
Accepted
time: 2ms
memory: 11624kb

input:

99998 87597 71679 3
23321 99432
61011 75568
59562 83016
28506 18917
33527 71746
7668 6679
4148 3070
16461 73797
45092 28402
6791 48043
50597 41294
63374 95417
52317 15407
33787 37709
50384 81996
16094 38940
68650 55035
70481 13519
30578 42978
87862 99595
26819 47356
94615 83775
23100 27960
57129 980...

output:

3 87597 1 3
76112 6155 22434 
1 1 0 

input:

3 87597 1 3
76112 6155 22434 
1 1 0 

output:

22434

result:

ok 

Test #68:

score: 20
Accepted
time: 8ms
memory: 10148kb

input:

99998 90556 3982 3
55569 37718
50806 80524
18312 16562
65488 70341
65803 15799
69221 66636
94816 50449
29315 85891
13143 51588
29882 18556
17493 49983
3241 92131
87771 95128
35908 43452
83063 33469
64934 36806
94216 95699
67165 88310
16894 30338
5035 64482
87157 88194
96602 60827
91326 18976
60833 9...

output:

3 90556 1 1
23629 
0 

input:

3 90556 1 1
23629 
0 

output:

23629

result:

ok 

Test #69:

score: 20
Accepted
time: 2ms
memory: 10276kb

input:

99998 79909 92565 3
88859 84427
14618 17244
68129 57886
36300 47030
21219 46420
17014 62101
42591 37059
56911 34226
67342 32924
39482 57723
43236 40208
95154 89528
72024 11170
61343 10776
72798 79510
60837 74393
77740 90999
79375 71014
47551 21020
90125 59504
53401 87460
12124 68259
12707 98804
9067...

output:

3 79909 0 3
2667 43399 1784 
0 0 1 

input:

3 79909 0 3
2667 43399 1784 
0 0 1 

output:

1784

result:

ok 

Test #70:

score: 20
Accepted
time: 8ms
memory: 10164kb

input:

69270 24085 61128 3
68199 15118
41658 15267
9633 662
5510 22366
62291 2403
23878 4021
17026 49991
12290 50837
26282 58833
53945 34220
15973 56296
45991 24116
45537 9328
45147 7621
47998 33099
9943 53203
13997 34315
4339 62106
22599 4580
3324 27707
9191 13150
44334 45282
47725 60279
43121 46517
17049...

output:

3 24085 0 3
61617 61128 33673 
1 0 1 

input:

3 24085 0 3
61617 61128 33673 
1 0 1 

output:

61128

result:

ok 

Test #71:

score: 20
Accepted
time: 2ms
memory: 10324kb

input:

69242 44332 10146 3
7883 18552
22727 26244
42839 22642
48750 58513
51736 27694
23205 9163
24370 38130
14210 46890
63155 26346
45294 36378
15751 4424
49130 43898
61347 1001
41674 58717
66016 44970
38743 66446
24709 27021
51092 53673
44510 20006
12395 41842
37670 53434
31110 25993
19277 2095
68701 465...

output:

3 44332 1 1
10146 
0 

input:

3 44332 1 1
10146 
0 

output:

10146

result:

ok 

Test #72:

score: 20
Accepted
time: 2ms
memory: 11480kb

input:

69258 37183 21844 3
3568 19492
62947 13375
29040 11955
984 42825
58469 45573
17197 56454
40105 66996
4160 17103
29841 68049
17352 57751
43188 51283
43016 39259
41341 24053
15422 7336
24991 41096
35832 22801
10128 53059
68207 17482
26030 30889
23120 49376
9297 21384
22185 33840
24171 20500
64556 4013...

output:

3 37183 0 1
35243 
1 

input:

3 37183 0 1
35243 
1 

output:

35243

result:

ok 

Test #73:

score: 20
Accepted
time: 2ms
memory: 11164kb

input:

69366 49894 57697 3
41375 50675
5007 58149
30125 3057
10096 44436
1842 655
57308 55350
36790 52159
55813 65365
53158 37328
23393 66362
2863 21626
41648 46091
52983 51494
13659 45191
68934 51324
4164 12544
6386 36506
43204 36426
44958 12916
47344 54643
2000 60200
60097 6311
3330 51286
50029 2148
8220...

output:

3 49894 0 3
56550 14390 68184 
0 0 1 

input:

3 49894 0 3
56550 14390 68184 
0 0 1 

output:

56550

result:

ok 

Test #74:

score: 20
Accepted
time: 6ms
memory: 10952kb

input:

69096 42739 4789 3
45282 12652
19052 39449
39681 54466
58966 66221
10473 61777
45144 3043
17824 34338
51894 55281
57207 24668
48379 793
67072 18461
68641 26473
31867 54409
47374 67677
14372 63964
62273 32200
45887 5410
55232 25958
56211 39709
33916 41331
2446 18606
10186 17392
18371 51156
39950 5453...

output:

3 42739 0 1
68533 
0 

input:

3 42739 0 1
68533 
0 

output:

68533

result:

ok 

Test #75:

score: 20
Accepted
time: 2ms
memory: 10576kb

input:

66930 59153 4676 3
7004 63609
34687 41913
52475 61106
57593 42098
38408 53442
51388 61176
40543 864
4073 14219
18096 46890
35719 143
39285 45392
45738 43859
44755 14930
34845 18122
18534 5172
23170 54575
60980 49730
25633 61907
58461 62508
31935 49777
33946 23367
50628 49547
25596 16214
11696 8731
3...

output:

3 59153 1 7
61024 44979 8322 4676 13312 13675 58179 
0 1 1 0 1 1 1 

input:

3 59153 1 7
61024 44979 8322 4676 13312 13675 58179 
0 1 1 0 1 1 1 

output:

4676

result:

ok 

Test #76:

score: 20
Accepted
time: 2ms
memory: 12016kb

input:

66645 33740 19280 3
22952 17674
57654 51266
52631 16942
33688 61469
66429 64852
62593 47804
8182 25604
40402 54504
60635 52831
41262 47572
29798 35663
56971 17441
12090 13348
58974 41728
34426 64779
43708 27398
43913 40917
25131 4781
12973 28015
16867 5639
23702 26232
13229 6005
55144 2552
37300 496...

output:

3 33740 0 11
130 30573 60524 16664 40440 4203 42589 57057 51159 15371 3165 
0 0 1 0 1 1 1 1 1 0 0 

input:

3 33740 0 11
130 30573 60524 16664 40440 4203 42589 57057 51159 15371 3165 
0 0 1 0 1 1 1 1 1 0 0 

output:

4203

result:

ok 

Test #77:

score: 20
Accepted
time: 2ms
memory: 12076kb

input:

66912 33116 25964 3
29784 58144
20167 50174
32902 34332
13567 133
37516 26556
55743 10732
49002 9731
47341 39096
49774 2730
66822 49778
51823 10164
60512 8347
35533 3933
25236 44672
9180 2050
10723 45618
712 57593
1871 37226
28487 41243
27882 46326
8535 32858
5745 58678
46769 11497
1561 57203
30760 ...

output:

3 33116 1 10
4688 25964 40131 54651 37821 27712 7993 45835 11686 22318 
1 0 0 0 0 1 1 0 1 1 

input:

3 33116 1 10
4688 25964 40131 54651 37821 27712 7993 45835 11686 22318 
1 0 0 0 0 1 1 0 1 1 

output:

25964

result:

ok 

Test #78:

score: 20
Accepted
time: 8ms
memory: 10412kb

input:

66783 48029 29954 3
7718 14264
45180 47413
8493 27266
37538 61463
6405 8648
23708 57722
37760 48280
45105 49745
23646 48674
6758 1070
23966 36538
61481 45780
45507 40154
51777 18045
62854 53383
39920 7330
50383 57786
62531 29427
64040 8284
49258 35428
55482 15248
44014 19572
31460 16102
8190 59801
2...

output:

3 48029 1 7
49633 54745 60922 3783 62409 5397 14145 
0 0 0 1 0 0 1 

input:

3 48029 1 7
49633 54745 60922 3783 62409 5397 14145 
0 0 0 1 0 0 1 

output:

5397

result:

ok 

Test #79:

score: 20
Accepted
time: 8ms
memory: 11336kb

input:

66859 56605 21424 3
7483 3312
4771 37748
28062 14410
15499 49955
3172 50112
14102 50403
61621 45960
49260 45959
37977 32725
21951 59361
66693 18627
17571 4199
16817 52300
36674 55981
50020 60334
15318 28522
60048 42857
21720 4136
52341 15061
50117 63392
56652 55241
36794 35309
18237 41763
60354 2319...

output:

3 56605 0 3
27942 32024 35717 
0 0 1 

input:

3 56605 0 3
27942 32024 35717 
0 0 1 

output:

35717

result:

ok 

Test #80:

score: 20
Accepted
time: 2ms
memory: 11712kb

input:

67022 62574 27512 3
24697 30781
921 56134
14879 7954
45803 8914
20815 34159
37545 53425
23144 8131
25636 22299
58066 59170
3687 21694
38489 23801
34186 9970
25110 49832
42470 62659
25187 19669
25433 66075
17057 28374
25238 12479
63457 37055
14651 8277
52314 38714
58275 8078
37531 57698
8142 40981
31...

output:

3 62574 1 6
17480 4358 8403 40742 66549 19018 
1 0 1 1 0 1 

input:

3 62574 1 6
17480 4358 8403 40742 66549 19018 
1 0 1 1 0 1 

output:

4358

result:

ok 

Test #81:

score: 20
Accepted
time: 6ms
memory: 11396kb

input:

2 2 1 3
1 2

output:

3 2 1 1
1 
0 

input:

3 2 1 1
1 
0 

output:

1

result:

ok 

Test #82:

score: 20
Accepted
time: 4ms
memory: 10876kb

input:

4 4 1 3
4 2
1 4
3 4

output:

3 4 1 3
2 1 3 
1 0 1 

input:

3 4 1 3
2 1 3 
1 0 1 

output:

1

result:

ok 

Test #83:

score: 20
Accepted
time: 8ms
memory: 12108kb

input:

4 4 3 3
2 3
3 1
3 4

output:

3 4 1 1
3 
0 

input:

3 4 1 1
3 
0 

output:

3

result:

ok 

Test #84:

score: 20
Accepted
time: 8ms
memory: 11780kb

input:

4 3 1 3
3 1
3 2
3 4

output:

3 3 1 3
1 2 4 
0 1 0 

input:

3 3 1 3
1 2 4 
0 1 0 

output:

1

result:

ok 

Subtask #4:

score: 0
Wrong Answer

Test #85:

score: 55
Accepted
time: 8ms
memory: 12024kb

input:

5 5 4 4
5 1
5 4
5 3
2 5

output:

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

input:

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

output:

4

result:

ok 

Test #86:

score: 0
Wrong Answer
time: 2ms
memory: 11992kb

input:

5 2 2 4
5 2
5 4
5 3
5 1

output:

4 2 0 1
5 
1 

input:

4 2 0 1
5 
1 

output:

-1

result:

wrong answer Wrong Answer [5]