QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#545027#8258. Gift ExchangeZhaoZiLong4 46ms9848kbC++20839b2024-09-02 21:55:432024-09-02 21:55:43

详细

Subtask #1:

score: 4
Accepted

Test #1:

score: 4
Accepted
time: 1ms
memory: 9784kb

input:

10
13 14 16 18 17 19 20 8 6 4
7 12 15 2 11 10 9 3 5 1
10
2 3
1 6
1 7
5 8
1 10
2 6
5 10
3 6
3 7
4 7

output:

No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes

result:

ok 10 token(s): yes count is 8, no count is 2

Test #2:

score: 4
Accepted
time: 1ms
memory: 9740kb

input:

10
12 19 15 20 14 9 4 13 17 16
11 18 7 5 10 8 3 1 2 6
10
6 10
2 6
6 7
3 8
1 8
7 8
6 8
4 5
1 7
4 5

output:

Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes

result:

ok 10 token(s): yes count is 8, no count is 2

Test #3:

score: 4
Accepted
time: 1ms
memory: 9780kb

input:

10
15 8 12 19 6 10 16 18 20 17
13 3 5 14 1 4 9 7 2 11
10
1 3
2 6
5 7
1 4
2 7
1 2
2 5
1 3
2 6
4 5

output:

No
No
Yes
Yes
Yes
No
No
No
No
No

result:

ok 10 token(s): yes count is 3, no count is 7

Test #4:

score: 4
Accepted
time: 1ms
memory: 9768kb

input:

10
15 9 13 20 17 19 8 3 10 16
11 7 5 18 2 12 6 1 4 14
10
1 2
4 7
6 7
7 10
3 6
6 10
6 10
6 7
1 3
1 2

output:

No
Yes
No
No
Yes
No
No
No
Yes
No

result:

ok 10 token(s): yes count is 3, no count is 7

Test #5:

score: 4
Accepted
time: 1ms
memory: 9844kb

input:

7
14 7 5 8 12 10 13
4 6 3 2 11 9 1
10
4 5
3 7
1 5
1 3
5 6
3 7
3 7
4 7
5 7
4 5

output:

No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No

result:

ok 10 token(s): yes count is 7, no count is 3

Test #6:

score: 4
Accepted
time: 9ms
memory: 9848kb

input:

10
14 2 10 19 4 20 16 15 8 17
13 1 9 7 3 18 12 11 6 5
10
8 9
1 9
7 10
2 6
9 10
5 8
1 2
1 9
2 3
6 8

output:

No
No
Yes
No
Yes
No
No
No
No
No

result:

ok 10 token(s): yes count is 2, no count is 8

Test #7:

score: 4
Accepted
time: 0ms
memory: 9784kb

input:

10
9 12 19 5 13 17 7 15 10 20
8 1 18 2 4 16 6 14 3 11
10
1 8
3 6
2 3
2 3
7 9
5 9
3 8
7 10
5 9
4 8

output:

No
No
No
No
No
No
No
Yes
No
No

result:

ok 10 token(s): yes count is 1, no count is 9

Test #8:

score: 4
Accepted
time: 3ms
memory: 9780kb

input:

10
20 11 4 9 19 15 8 13 14 17
3 10 1 6 18 12 7 2 5 16
10
4 5
4 8
3 10
4 10
4 6
2 9
3 10
4 8
3 5
7 10

output:

No
No
No
No
No
No
No
No
No
No

result:

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

Test #9:

score: 4
Accepted
time: 21ms
memory: 9844kb

input:

10
15 17 20 12 11 2 18 8 14 16
13 10 19 3 9 1 6 7 4 5
10
2 10
1 9
2 9
2 10
2 9
2 9
2 9
1 9
1 9
2 9

output:

No
No
No
No
No
No
No
No
No
No

result:

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

Test #10:

score: 4
Accepted
time: 46ms
memory: 9772kb

input:

10
14 20 11 10 6 15 18 12 4 17
7 19 9 5 2 3 13 8 1 16
10
1 10
1 9
2 10
1 8
2 9
3 10
1 7
2 8
3 9
4 10

output:

No
No
No
No
No
Yes
No
No
Yes
Yes

result:

ok 10 token(s): yes count is 3, no count is 7

Test #11:

score: 4
Accepted
time: 38ms
memory: 9804kb

input:

10
4 18 20 12 2 10 6 16 8 14
3 17 19 11 1 9 5 15 7 13
10
3 6
6 10
2 10
1 10
1 4
3 9
6 9
6 10
3 10
4 5

output:

No
No
No
No
No
No
No
No
No
No

result:

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

Test #12:

score: 4
Accepted
time: 1ms
memory: 9724kb

input:

10
14 12 18 17 20 15 19 16 13 11
6 5 7 9 4 10 2 3 1 8
10
3 5
3 9
3 7
3 4
3 5
9 10
1 8
3 10
1 10
4 6

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes

result:

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

Test #13:

score: 4
Accepted
time: 2ms
memory: 9808kb

input:

10
17 19 8 20 7 15 10 3 18 6
14 16 1 13 4 12 9 2 11 5
10
3 10
4 9
3 5
8 9
6 9
3 8
5 7
4 5
3 4
2 5

output:

No
No
No
No
No
No
No
No
No
Yes

result:

ok 10 token(s): yes count is 1, no count is 9

Test #14:

score: 4
Accepted
time: 1ms
memory: 9728kb

input:

2
4 3
2 1
1
1 2

output:

Yes

result:

ok YES

Test #15:

score: 4
Accepted
time: 1ms
memory: 9732kb

input:

2
2 4
1 3
1
1 2

output:

No

result:

ok NO

Test #16:

score: 4
Accepted
time: 1ms
memory: 9784kb

input:

3
4 5 6
1 2 3
1
1 3

output:

Yes

result:

ok YES

Subtask #2:

score: 0
Time Limit Exceeded

Dependency #1:

100%
Accepted

Test #17:

score: 0
Time Limit Exceeded

input:

15
29 20 30 4 9 2 24 19 17 25 18 28 21 6 23
26 10 27 3 8 1 14 15 11 16 12 22 7 5 13
10
8 14
5 15
9 11
5 10
8 11
2 13
4 9
8 13
6 14
9 12

output:

No
No
Yes
No
Yes

result:


Subtask #3:

score: 0
Time Limit Exceeded

Test #30:

score: 0
Time Limit Exceeded

input:

100000
200000 87337 190412 58171 10676 178924 155670 153538 106523 166320 196463 174807 19706 66971 196345 114283 119288 59218 155349 194059 154822 98022 199346 153510 145408 187388 174214 150932 65211 35112 20551 176504 139581 41024 52730 150416 18789 190510 108780 47812 169962 158959 135239 191992...

output:


result:


Subtask #4:

score: 0
Time Limit Exceeded

Test #39:

score: 0
Time Limit Exceeded

input:

74998
147369 94378 68913 123990 65257 88482 116281 130255 78568 141536 99818 113372 26849 44703 95080 48018 147366 120676 91071 19208 101933 124465 78741 140833 90216 52837 145872 105601 142557 113425 86814 84542 101123 108992 78297 100014 104368 69638 40964 118227 76398 117479 115743 72849 102952 1...

output:


result:


Subtask #5:

score: 0
Time Limit Exceeded

Test #52:

score: 0
Time Limit Exceeded

input:

71726
4 5 7 10 11 17 20 24 26 27 28 29 31 35 36 38 40 42 44 46 48 50 51 52 55 56 57 59 61 62 66 68 69 70 72 73 75 78 79 83 85 86 91 93 96 97 98 100 105 107 108 109 110 111 112 113 116 117 120 124 125 126 127 129 132 133 135 139 144 145 146 148 149 152 153 154 156 157 159 161 163 165 167 173 174 178 ...

output:


result:


Subtask #6:

score: 0
Skipped

Dependency #5:

0%

Subtask #7:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%

Subtask #8:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%