QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#72451 | #5176. 多控制反转 | haojiandan | 100 ✓ | 2ms | 3688kb | C++14 | 1.6kb | 2023-01-15 16:12:51 | 2023-01-15 16:13:11 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 15
Accepted
Test #1:
score: 15
Accepted
time: 2ms
memory: 3388kb
input:
0 2 1 1
output:
1 1 0
result:
ok OK.
Test #2:
score: 0
Accepted
time: 2ms
memory: 3508kb
input:
13 28 105 1
output:
44 3 0 1 14 3 14 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 10 12 13 3 11 9 10 3 10 8 9 3 9 7 8 3 8 6 7 3 7 5 6 3 6 4 5 3 5 3 4 3 4 2 3 3 3 1 2 3 14 2 1 3 0 1 14 3 14 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 10 12 13 3 11 ...
result:
ok OK.
Test #3:
score: 0
Accepted
time: 2ms
memory: 3424kb
input:
5 12 41 1
output:
12 3 0 1 6 3 6 2 1 3 3 1 2 3 2 4 5 3 3 1 2 3 6 2 1 3 0 1 6 3 6 2 1 3 3 1 2 3 2 4 5 3 3 1 2 3 6 2 1
result:
ok OK.
Test #4:
score: 0
Accepted
time: 0ms
memory: 3420kb
input:
20 42 161 1
output:
72 3 0 1 21 3 21 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 17 19 20 3 18 16 17 3 17 15 16 3 16 14 15 3 15 13 14 3 14 12 13 3 13 11 12 3 12 10 11 3 11 9 10 3 10 8 9 3 9 7 8 3 8 6 7 3 7 ...
result:
ok OK.
Subtask #2:
score: 10
Accepted
Dependency #1:
100%
Accepted
Test #5:
score: 10
Accepted
time: 2ms
memory: 3616kb
input:
48 98 385 2
output:
184 3 0 1 49 3 49 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 30 ...
result:
ok OK.
Test #6:
score: 0
Accepted
time: 2ms
memory: 3504kb
input:
41 84 329 2
output:
156 3 0 1 42 3 42 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 30 ...
result:
ok OK.
Test #7:
score: 0
Accepted
time: 2ms
memory: 3620kb
input:
50 102 401 2
output:
192 3 0 1 51 3 51 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 30 ...
result:
ok OK.
Subtask #3:
score: 10
Accepted
Dependency #2:
100%
Accepted
Test #8:
score: 10
Accepted
time: 2ms
memory: 3428kb
input:
0 2 1 3
output:
1 1 0
result:
ok OK.
Test #9:
score: 0
Accepted
time: 2ms
memory: 3424kb
input:
19 40 153 3
output:
68 3 0 1 20 3 20 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 16 18 19 3 17 15 16 3 16 14 15 3 15 13 14 3 14 12 13 3 13 11 12 3 12 10 11 3 11 9 10 3 10 8 9 3 9 7 8 3 8 6 7 3 7 5 6 3 6 4 5 3 5 3 4 3 ...
result:
ok OK.
Test #10:
score: 0
Accepted
time: 0ms
memory: 3504kb
input:
47 96 377 3
output:
180 3 0 1 48 3 48 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 30 ...
result:
ok OK.
Test #11:
score: 0
Accepted
time: 1ms
memory: 3420kb
input:
25 52 201 3
output:
92 3 0 1 26 3 26 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 22 24 25 3 23 21 22 3 22 20 21 3 21 19 20 3 20 18 19 3 19 17 18 3 18 1...
result:
ok OK.
Test #12:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
50 102 401 3
output:
192 3 0 1 51 3 51 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 30 ...
result:
ok OK.
Subtask #4:
score: 10
Accepted
Test #13:
score: 10
Accepted
time: 0ms
memory: 3480kb
input:
0 2 1 4
output:
1 1 0
result:
ok OK.
Test #14:
score: 0
Accepted
time: 2ms
memory: 3488kb
input:
18 20 325 4
output:
64 3 0 1 19 3 19 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 15 17 18 3 16 14 15 3 15 13 14 3 14 12 13 3 13 11 12 3 12 10 11 3 11 9 10 3 10 8 9 3 9 7 8 3 8 6 7 3 7 5 6 3 6 4 5 3 5 3 4 3 4 2 3 3 3 1 2 3 19 2 1...
result:
ok OK.
Test #15:
score: 0
Accepted
time: 0ms
memory: 3464kb
input:
14 16 197 4
output:
48 3 0 1 15 3 15 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 11 13 14 3 12 10 11 3 11 9 10 3 10 8 9 3 9 7 8 3 8 6 7 3 7 5 6 3 6 4 5 3 5 3 4 3 4 2 3 3 3 1 2 3 15 2 1 3 0 1 15 3 15 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11...
result:
ok OK.
Test #16:
score: 0
Accepted
time: 2ms
memory: 3680kb
input:
20 22 401 4
output:
72 3 0 1 21 3 21 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 17 19 20 3 18 16 17 3 17 15 16 3 16 14 15 3 15 13 14 3 14 12 13 3 13 11 12 3 12 10 11 3 11 9 10 3 10 8 9 3 9 7 8 3 8 6 7 3 7 ...
result:
ok OK.
Subtask #5:
score: 20
Accepted
Dependency #4:
100%
Accepted
Test #17:
score: 20
Accepted
time: 2ms
memory: 3656kb
input:
18 20 325 5
output:
64 3 0 1 19 3 19 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 15 17 18 3 16 14 15 3 15 13 14 3 14 12 13 3 13 11 12 3 12 10 11 3 11 9 10 3 10 8 9 3 9 7 8 3 8 6 7 3 7 5 6 3 6 4 5 3 5 3 4 3 4 2 3 3 3 1 2 3 19 2 1...
result:
ok OK.
Test #18:
score: 0
Accepted
time: 2ms
memory: 3624kb
input:
17 19 290 5
output:
60 3 0 1 18 3 18 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 14 16 17 3 15 13 14 3 14 12 13 3 13 11 12 3 12 10 11 3 11 9 10 3 10 8 9 3 9 7 8 3 8 6 7 3 7 5 6 3 6 4 5 3 5 3 4 3 4 2 3 3 3 1 2 3 18 2 1 3 0 1 18 3 18 2 1 3 3...
result:
ok OK.
Test #19:
score: 0
Accepted
time: 2ms
memory: 3392kb
input:
20 22 401 5
output:
72 3 0 1 21 3 21 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 17 19 20 3 18 16 17 3 17 15 16 3 16 14 15 3 15 13 14 3 14 12 13 3 13 11 12 3 12 10 11 3 11 9 10 3 10 8 9 3 9 7 8 3 8 6 7 3 7 ...
result:
ok OK.
Subtask #6:
score: 10
Accepted
Test #20:
score: 10
Accepted
time: 2ms
memory: 3504kb
input:
14 16 393 6
output:
48 3 0 1 15 3 15 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 11 13 14 3 12 10 11 3 11 9 10 3 10 8 9 3 9 7 8 3 8 6 7 3 7 5 6 3 6 4 5 3 5 3 4 3 4 2 3 3 3 1 2 3 15 2 1 3 0 1 15 3 15 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11...
result:
ok OK.
Test #21:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
39 41 1093 6
output:
148 3 0 1 40 3 40 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 30 ...
result:
ok OK.
Test #22:
score: 0
Accepted
time: 2ms
memory: 3504kb
input:
0 2 1 6
output:
1 1 0
result:
ok OK.
Test #23:
score: 0
Accepted
time: 2ms
memory: 3464kb
input:
50 52 1401 6
output:
192 3 0 1 51 3 51 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 30 ...
result:
ok OK.
Subtask #7:
score: 10
Accepted
Dependency #2:
100%
Accepted
Dependency #4:
100%
Accepted
Test #24:
score: 10
Accepted
time: 2ms
memory: 3404kb
input:
93 95 745 7
output:
364 3 0 1 94 3 94 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 30 ...
result:
ok OK.
Test #25:
score: 0
Accepted
time: 2ms
memory: 3520kb
input:
82 84 657 7
output:
320 3 0 1 83 3 83 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 30 ...
result:
ok OK.
Test #26:
score: 0
Accepted
time: 0ms
memory: 3396kb
input:
100 102 801 7
output:
392 3 0 1 101 3 101 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 3...
result:
ok OK.
Subtask #8:
score: 15
Accepted
Dependency #3:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
100%
Accepted
Dependency #7:
100%
Accepted
Test #27:
score: 15
Accepted
time: 2ms
memory: 3688kb
input:
94 96 753 8
output:
368 3 0 1 95 3 95 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 30 ...
result:
ok OK.
Test #28:
score: 0
Accepted
time: 2ms
memory: 3624kb
input:
70 72 561 8
output:
272 3 0 1 71 3 71 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 30 ...
result:
ok OK.
Test #29:
score: 0
Accepted
time: 0ms
memory: 3484kb
input:
100 102 801 8
output:
392 3 0 1 101 3 101 2 1 3 3 1 2 3 4 2 3 3 5 3 4 3 6 4 5 3 7 5 6 3 8 6 7 3 9 7 8 3 10 8 9 3 11 9 10 3 12 10 11 3 13 11 12 3 14 12 13 3 15 13 14 3 16 14 15 3 17 15 16 3 18 16 17 3 19 17 18 3 20 18 19 3 21 19 20 3 22 20 21 3 23 21 22 3 24 22 23 3 25 23 24 3 26 24 25 3 27 25 26 3 28 26 27 3 29 27 28 3 3...
result:
ok OK.
Extra Test:
score: 0
Extra Test Passed