QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#865363#7721. Flow Problemucup-team4744#WA 164ms3968kbC++233.1kb2025-01-21 17:06:412025-01-21 17:06:42

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 161ms
memory: 3840kb

input:

0 5
no
0 4
no
0 10
no
0 0
yes
1 2
no
0 19
no
1 19
no
1 19
yes

output:

wait 1
wait 1034
wait 10
left
wait 338
switch
wait 0
right

result:

ok OK

Test #2:

score: 0
Accepted
time: 161ms
memory: 3968kb

input:

1 0
no
1 1
no
1 1
no
0 1
no
0 0
yes
1 0
no
1 1
no
1 1
yes

output:

wait 1
wait 1028
switch
wait 1
left
wait 257
wait 0
right

result:

ok OK

Test #3:

score: 0
Accepted
time: 162ms
memory: 3968kb

input:

0 0
no
1 0
no
1 1
no
0 1
no
0 0
yes
0 0
no
1 1
no
1 1
yes

output:

wait 1
wait 1029
switch
wait 1
left
wait 258
wait 0
right

result:

ok OK

Test #4:

score: 0
Accepted
time: 157ms
memory: 3840kb

input:

1 2
no
1 1
no
1 2
no
1 0
yes
0 0
no
1 1
no
0 1
no
0 2
yes

output:

wait 1
wait 1031
wait 2
left
wait 172
switch
wait 1
right

result:

ok OK

Test #5:

score: 0
Accepted
time: 160ms
memory: 3968kb

input:

1 0
no
0 0
no
1 2
no
1 0
yes
1 2
no
1 1
no
0 1
no
0 2
yes

output:

wait 1
wait 1029
wait 2
left
wait 175
switch
wait 1
right

result:

ok OK

Test #6:

score: 0
Accepted
time: 158ms
memory: 3840kb

input:

1 2
no
1 1
no
1 2
no
1 0
yes
0 2
no
1 3
no
0 3
no
0 3
yes

output:

wait 1
wait 1031
wait 2
left
wait 170
switch
wait 0
right

result:

ok OK

Test #7:

score: 0
Accepted
time: 160ms
memory: 3968kb

input:

1 3
no
0 3
no
0 2
no
0 0
yes
1 3
no
0 3
no
1 3
no
1 3
yes

output:

wait 1
wait 1033
wait 2
left
wait 169
switch
wait 0
right

result:

ok OK

Test #8:

score: 0
Accepted
time: 160ms
memory: 3968kb

input:

0 0
no
0 1
no
1 0
no
1 0
yes
1 2
no
0 3
no
0 4
yes

output:

wait 1
wait 1028
wait 0
left
wait 106
wait 1
right

result:

ok OK

Test #9:

score: 0
Accepted
time: 161ms
memory: 3968kb

input:

1 0
no
1 1
no
0 0
no
0 0
yes
1 4
no
1 3
no
1 4
yes

output:

wait 1
wait 1028
wait 0
left
wait 99
wait 1
right

result:

ok OK

Test #10:

score: 0
Accepted
time: 164ms
memory: 3968kb

input:

1 3
no
1 4
no
0 2
no
0 0
yes
0 1
no
1 4
no
1 5
yes

output:

wait 1
wait 1025
wait 2
left
wait 174
wait 1
right

result:

ok OK

Test #11:

score: 0
Accepted
time: 160ms
memory: 3968kb

input:

1 3
no
1 2
no
1 2
no
1 0
yes
0 2
no
0 4
no
0 5
yes

output:

wait 1
wait 1032
wait 2
left
wait 170
wait 1
right

result:

ok OK

Test #12:

score: 0
Accepted
time: 158ms
memory: 3840kb

input:

0 1
no
0 2
no
1 6
no
1 0
yes
0 2
no
1 6
no
0 6
no
0 6
yes

output:

wait 1
wait 1027
wait 6
left
wait 341
switch
wait 0
right

result:

ok OK

Test #13:

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

input:

1 4
no
1 5
no
0 6
no
0 0
yes
1 4
no
0 6
no
1 6
no
1 6
yes

output:

wait 1
wait 1024
wait 6
left
wait 339
switch
wait 0
right

result:

ok OK

Test #14:

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

input:

0 3
no
0 4
no
0 5
no
1 5
no
1 0
yes
0 2
no
0 0
no
0 7
yes

output:

wait 1
wait 1025
switch
wait 5
left
wait 334
wait 7
right

result:

ok OK

Test #15:

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

input:

0 7
no
0 6
no
1 4
no
0 4
no
0 0
yes
0 5
no
0 1
no
1 1
no
1 7
yes

output:

wait 1
wait 1387
switch
wait 4
left
wait 436
switch
wait 6
right

result:

ok OK

Test #16:

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

input:

0 1
no
0 0
no
1 3
no
0 3
no
0 0
yes
0 2
no
0 8
no
1 8
no
1 8
yes

output:

wait 1
wait 1030
switch
wait 3
left
wait 174
switch
wait 0
right

result:

ok OK

Test #17:

score: 0
Accepted
time: 159ms
memory: 3840kb

input:

0 8
no
0 7
no
1 6
no
0 6
no
0 0
yes
1 6
no
0 8
no
1 8
no
1 8
yes

output:

wait 1
wait 1040
switch
wait 6
left
wait 165
switch
wait 0
right

result:

ok OK

Test #18:

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

input:

1 3
no
1 4
no
1 9
no
0 9
no
0 0
yes
1 1
no
0 9
no
1 9
no
1 9
yes

output:

wait 1
wait 1025
switch
wait 9
left
wait 249
switch
wait 0
right

result:

ok OK

Test #19:

score: 0
Accepted
time: 160ms
memory: 3840kb

input:

1 2
no
1 1
no
0 9
no
1 9
no
1 0
yes
1 8
no
1 9
no
0 9
no
0 9
yes

output:

wait 1
wait 1031
switch
wait 9
left
wait 259
switch
wait 0
right

result:

ok OK

Test #20:

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

input:

1 46
no
1 45
no
1 7
no
1 0
yes
0 41
no
1 49
no
0 49
no
0 49
yes

output:

wait 1
wait 1038
wait 7
left
wait 209
switch
wait 0
right

result:

ok OK

Test #21:

score: 0
Accepted
time: 144ms
memory: 3840kb

input:

0 62
no
0 61
no
1 21
no
0 21
no
0 0
yes
0 66
no
1 25
no
1 74
yes

output:

wait 1
wait 1133
switch
wait 21
left
wait 242
wait 49
right

result:

ok OK

Test #22:

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

input:

0 19
no
0 18
no
0 23
no
0 0
yes
1 3
no
1 55
no
1 99
yes

output:

wait 1
wait 1395
wait 23
left
wait 452
wait 44
right

result:

ok OK

Test #23:

score: 0
Accepted
time: 146ms
memory: 3840kb

input:

0 52
no
0 51
no
0 115
no
0 0
yes
0 107
no
0 124
no
1 124
no
1 124
yes

output:

wait 1
wait 1186
wait 115
left
wait 233
switch
wait 0
right

result:

ok OK

Test #24:

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

input:

0 34
no
0 35
no
1 83
no
1 0
yes
1 61
no
1 99
no
0 99
no
0 149
yes

output:

wait 1
wait 1081
wait 83
left
wait 262
switch
wait 50
right

result:

ok OK

Test #25:

score: 0
Accepted
time: 135ms
memory: 3968kb

input:

0 156
no
0 157
no
1 52
no
1 0
yes
1 1
no
1 174
no
0 174
no
0 174
yes

output:

wait 1
wait 840
wait 52
left
wait 177
switch
wait 0
right

result:

ok OK

Test #26:

score: 0
Accepted
time: 159ms
memory: 3968kb

input:

1 38
no
1 39
no
0 74
no
0 0
yes
1 119
no
0 99
no
1 99
no
1 199
yes

output:

wait 1
wait 1086
wait 74
left
wait 181
switch
wait 100
right

result:

ok OK

Test #27:

score: 0
Accepted
time: 140ms
memory: 3840kb

input:

0 132
no
0 133
no
0 96
no
1 96
no
1 0
yes
1 216
no
1 224
no
0 224
no
0 224
yes

output:

wait 1
wait 863
switch
wait 96
left
wait 442
switch
wait 0
right

result:

ok OK

Test #28:

score: 0
Accepted
time: 129ms
memory: 3968kb

input:

0 178
no
0 179
no
1 2
no
1 0
yes
1 215
no
1 249
no
0 249
no
0 249
yes

output:

wait 1
wait 818
wait 2
left
wait 466
switch
wait 0
right

result:

ok OK

Test #29:

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

input:

0 267
no
0 266
no
0 101
no
0 0
yes
0 244
no
0 274
no
1 274
no
1 274
yes

output:

wait 1
wait 1265
wait 101
left
wait 520
switch
wait 0
right

result:

ok OK

Test #30:

score: 0
Accepted
time: 143ms
memory: 3968kb

input:

1 151
no
1 152
no
0 202
no
0 0
yes
0 134
no
0 299
no
1 299
no
1 299
yes

output:

wait 1
wait 845
wait 202
left
wait 435
switch
wait 0
right

result:

ok OK

Test #31:

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

input:

1 258
no
1 259
no
0 301
no
0 0
yes
0 168
no
0 324
no
1 324
no
1 324
yes

output:

wait 1
wait 739
wait 301
left
wait 494
switch
wait 0
right

result:

ok OK

Test #32:

score: 0
Accepted
time: 121ms
memory: 3840kb

input:

0 135
no
0 134
no
1 296
no
0 296
no
0 0
yes
0 113
no
0 112
no
1 112
no
1 349
yes

output:

wait 1
wait 1131
switch
wait 296
left
wait 1
switch
wait 237
right

result:

ok OK

Test #33:

score: 0
Accepted
time: 81ms
memory: 3840kb

input:

1 257
no
1 256
no
0 248
no
1 248
no
1 0
yes
1 141
no
1 140
no
0 140
no
0 374
yes

output:

wait 1
wait 1255
switch
wait 248
left
wait 1
switch
wait 234
right

result:

ok OK

Test #34:

score: 0
Accepted
time: 87ms
memory: 3968kb

input:

1 230
no
1 229
no
0 198
no
1 198
no
1 0
yes
1 156
no
1 155
no
0 155
no
0 399
yes

output:

wait 1
wait 1228
switch
wait 198
left
wait 1
switch
wait 244
right

result:

ok OK

Test #35:

score: 0
Accepted
time: 125ms
memory: 3840kb

input:

0 129
no
0 128
no
1 146
no
0 146
no
0 0
yes
0 37
no
0 36
no
1 36
no
1 424
yes

output:

wait 1
wait 1125
switch
wait 146
left
wait 1
switch
wait 388
right

result:

ok OK

Test #36:

score: 0
Accepted
time: 87ms
memory: 3840kb

input:

0 292
no
0 291
no
1 98
no
0 98
no
0 0
yes
1 51
no
1 52
no
1 449
yes

output:

wait 1
wait 1290
switch
wait 98
left
wait 1
wait 397
right

result:

ok OK

Test #37:

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

input:

1 90
no
1 89
no
0 45
no
1 45
no
1 0
yes
0 468
no
0 469
no
0 474
yes

output:

wait 1
wait 1085
switch
wait 45
left
wait 1
wait 5
right

result:

ok OK

Test #38:

score: 0
Accepted
time: 92ms
memory: 3968kb

input:

0 411
no
0 412
no
1 0
no
1 0
yes
0 24
no
0 25
no
0 499
yes

output:

wait 1
wait 587
wait 0
left
wait 1
wait 474
right

result:

ok OK

Test #39:

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

input:

1 404
no
1 403
no
1 50
no
1 0
yes
0 320
no
0 321
no
0 524
yes

output:

wait 1
wait 1403
wait 50
left
wait 1
wait 203
right

result:

ok OK

Test #40:

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

input:

0 119
no
0 118
no
0 103
no
0 0
yes
1 192
no
1 275
no
1 549
yes

output:

wait 1
wait 1115
wait 103
left
wait 83
wait 274
right

result:

ok OK

Test #41:

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

input:

1 24
no
1 23
no
1 113
no
1 0
yes
1 163
no
1 162
no
0 162
no
0 574
yes

output:

wait 1
wait 1060
wait 113
left
wait 1
switch
wait 412
right

result:

ok OK

Test #42:

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

input:

0 439
no
0 438
no
0 200
no
0 0
yes
1 448
no
1 449
no
1 599
yes

output:

wait 1
wait 1438
wait 200
left
wait 1
wait 150
right

result:

ok OK

Test #43:

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

input:

0 402
no
0 403
no
1 250
no
1 0
yes
1 579
no
1 578
no
0 578
no
0 624
yes

output:

wait 1
wait 596
wait 250
left
wait 1
switch
wait 46
right

result:

ok OK

Test #44:

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

input:

0 305
no
0 304
no
0 301
no
0 0
yes
1 456
no
1 457
no
1 649
yes

output:

wait 1
wait 1303
wait 301
left
wait 1
wait 192
right

result:

ok OK

Test #45:

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

input:

0 656
no
0 657
no
1 350
no
1 0
yes
0 192
no
0 193
no
0 674
yes

output:

wait 1
wait 342
wait 350
left
wait 1
wait 481
right

result:

ok OK

Test #46:

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

input:

0 300
no
0 299
no
0 401
no
0 0
yes
1 463
no
1 464
no
1 699
yes

output:

wait 1
wait 1298
wait 401
left
wait 1
wait 235
right

result:

ok OK

Test #47:

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

input:

0 587
no
0 588
no
1 450
no
1 0
yes
1 87
no
1 86
no
0 86
no
0 724
yes

output:

wait 1
wait 411
wait 450
left
wait 1
switch
wait 638
right

result:

ok OK

Test #48:

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

input:

1 606
no
1 607
no
0 500
no
0 0
yes
0 570
no
0 569
no
1 569
no
1 749
yes

output:

wait 1
wait 392
wait 500
left
wait 1
switch
wait 180
right

result:

ok OK

Test #49:

score: 0
Accepted
time: 128ms
memory: 3840kb

input:

1 335
no
1 336
no
0 550
no
0 0
yes
1 184
no
1 185
no
1 774
yes

output:

wait 1
wait 663
wait 550
left
wait 1
wait 589
right

result:

ok OK

Test #50:

score: 0
Accepted
time: 26ms
memory: 3840kb

input:

1 593
no
1 592
no
1 600
no
1 0
yes
1 758
no
1 757
no
0 757
no
0 799
yes

output:

wait 1
wait 1592
wait 600
left
wait 1
switch
wait 42
right

result:

ok OK

Test #51:

score: 0
Accepted
time: 85ms
memory: 3840kb

input:

0 461
no
0 462
no
1 650
no
1 0
yes
0 220
no
0 221
no
0 824
yes

output:

wait 1
wait 537
wait 650
left
wait 1
wait 603
right

result:

ok OK

Test #52:

score: 0
Accepted
time: 85ms
memory: 3968kb

input:

0 291
no
0 290
no
0 701
no
0 0
yes
1 184
no
1 185
no
1 849
yes

output:

wait 1
wait 1289
wait 701
left
wait 1
wait 664
right

result:

ok OK

Test #53:

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

input:

0 713
no
0 712
no
0 750
no
0 0
yes
1 468
no
1 469
no
1 874
yes

output:

wait 1
wait 1712
wait 750
left
wait 1
wait 405
right

result:

ok OK

Test #54:

score: 0
Accepted
time: 98ms
memory: 3840kb

input:

1 196
no
1 195
no
1 802
no
1 0
yes
0 511
no
0 512
no
0 899
yes

output:

wait 1
wait 1193
wait 802
left
wait 1
wait 387
right

result:

ok OK

Test #55:

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

input:

0 0
no
0 1
no
0 1
no
1 1
no
1 0
yes
0 0
no
0 1
no
0 1
yes

output:

wait 1
wait 1028
switch
wait 1
left
wait 257
wait 0
right

result:

ok OK

Test #56:

score: 0
Accepted
time: 163ms
memory: 3840kb

input:

1 0
no
1 1
no
1 1
no
0 1
no
0 0
yes
0 1
no
1 1
no
1 1
yes

output:

wait 1
wait 1028
switch
wait 1
left
wait 259
wait 0
right

result:

ok OK

Test #57:

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

input:

1 993
no
1 992
no
0 999
no
1 999
no
1 0
yes
1 993
no
1 992
no
0 992
no
0 999
yes

output:

wait 1
wait 1992
switch
wait 999
left
wait 1
switch
wait 7
right

result:

ok OK

Test #58:

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

input:

1 973
no
1 972
no
1 994
no
1 0
yes
1 973
no
1 972
no
0 972
no
0 996
yes

output:

wait 1
wait 1972
wait 994
left
wait 1
switch
wait 24
right

result:

ok OK

Test #59:

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

input:

1 999
no
1 998
no
1 997
no
1 0
yes
1 999
no
1 998
no
0 998
no
0 999
yes

output:

wait 1
wait 1
wait 997
left
wait 1
switch
wait 1
right

result:

ok OK

Test #60:

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

input:

1 998
no
1 997
no
0 999
no
1 999
no
1 0
yes
1 998
no
1 997
no
0 997
no
0 999
yes

output:

wait 1
wait 1997
switch
wait 999
left
wait 1
switch
wait 2
right

result:

ok OK

Test #61:

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

input:

0 999
no
0 998
no
0 997
no
0 0
yes
0 999
no
0 998
no
1 998
no
1 999
yes

output:

wait 1
wait 1
wait 997
left
wait 1
switch
wait 1
right

result:

ok OK

Test #62:

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

input:

0 998
no
0 997
no
1 999
no
0 999
no
0 0
yes
0 998
no
0 997
no
1 997
no
1 999
yes

output:

wait 1
wait 1997
switch
wait 999
left
wait 1
switch
wait 2
right

result:

ok OK

Test #63:

score: 0
Accepted
time: 7ms
memory: 3840kb

input:

0 800
no
0 799
no
1 999
no
0 999
no
0 0
yes
0 804
no
0 803
no
1 803
no
1 999
yes

output:

wait 1
wait 1799
switch
wait 999
left
wait 1
switch
wait 196
right

result:

ok OK

Test #64:

score: 0
Accepted
time: 162ms
memory: 3840kb

input:

0 0
no
0 1
no
1 10
no
1 0
yes
0 0
no
1 19
no
0 19
no
0 19
yes

output:

wait 1
wait 1028
wait 10
left
wait 340
switch
wait 0
right

result:

ok OK

Test #65:

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

input:

0 4
no
0 3
no
0 10
no
0 0
yes
0 4
no
0 19
no
1 19
no
1 19
yes

output:

wait 1
wait 1033
wait 10
left
wait 345
switch
wait 0
right

result:

ok OK

Test #66:

score: 0
Accepted
time: 161ms
memory: 3968kb

input:

1 3
no
1 2
no
0 21
no
1 21
no
1 0
yes
1 3
no
0 4
no
0 23
yes

output:

wait 1
wait 1032
switch
wait 21
left
wait 200
wait 19
right

result:

ok OK

Test #67:

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

input:

0 3
no
0 2
no
1 21
no
0 21
no
0 0
yes
0 3
no
1 4
no
1 23
yes

output:

wait 1
wait 1032
switch
wait 21
left
wait 200
wait 19
right

result:

ok OK

Test #68:

score: 0
Accepted
time: 158ms
memory: 3840kb

input:

1 6
no
1 5
no
0 0
no
1 0
no
1 0
yes
0 2
no
0 22
no
0 29
yes

output:

wait 1
wait 1386
switch
wait 0
left
wait 320
wait 7
right

result:

ok OK

Test #69:

score: -100
Wrong Answer
time: 161ms
memory: 3840kb

input:

0 3
no
0 2
no
1 9
no
0 9
no
0 0
yes
0 3
no
1 10
no
1 14
no
1 15

output:

wait 1
wait 1032
switch
wait 9
left
wait 254
wait 4
right

result:

wrong answer unexpected eof