QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#207850#6260. Historic Exhibitionlmq26052003TL 1ms3904kbC++203.6kb2023-10-08 21:29:452023-10-08 21:29:45

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

1
4
3

result:

ok correct

Test #2:

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

input:

2 2
1 1
2 3
1 1

output:

impossible

result:

ok impossible

Test #3:

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

input:

2 3
9 8
4 5
4 9 5

output:

impossible

result:

ok impossible

Test #4:

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

input:

1000 1000
141 140
239 240
380 380
114 115
345 345
60 60
341 340
224 223
400 399
125 124
163 162
53 53
62 62
326 326
36 36
91 92
187 186
48 49
123 123
232 233
275 274
374 373
321 322
251 250
347 348
221 222
64 65
143 144
65 65
135 136
209 208
336 336
118 117
189 190
87 86
58 58
66 67
185 185
289 288
...

output:

854
36
118
3
1
85
4
227
131
12
959
363
420
70
533
938
218
323
18
179
715
52
155
166
39
164
103
385
255
545
343
253
174
628
28
330
145
176
326
963
918
762
974
193
129
472
270
84
257
332
250
198
430
802
116
22
175
21
27
491
729
667
261
315
859
17
125
953
910
15
41
133
676
77
536
283
317
127
181
108
20...

result:

ok correct

Test #5:

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

input:

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

output:

4
49
1
5
7
21
34
9
2
6
24
20
55
27
16
11
29
12
59
10
18
31
33
14
15
51
3
80
32
30
97
17
42
19
41
37
39
22
44
50
98
64
26
70
28
35
58
25
60
52
8
84
54
62
23
65
83
40
48
72
43
75
47
56
76
67
45
68
73
61
74
86
88
46
66
57
63
79
78
85
94
71
81
87
77
100
90
82
95
91
69
99
92
96
36
53
13
89
38
93

result:

ok correct

Test #6:

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

input:

100 60
11 11
43 44
15 16
27 27
18 18
8 8
2 1
58 57
23 22
10 11
14 15
9 8
37 38
57 56
32 33
48 49
23 22
13 12
6 5
28 29
4 4
4 3
6 7
14 15
6 7
42 42
5 5
2 2
48 48
2 1
18 17
49 48
15 16
8 7
38 38
35 34
33 32
38 39
36 35
41 40
18 19
7 7
45 44
53 52
11 11
26 25
15 14
35 36
5 4
7 8
56 55
19 18
52 52
35 35...

output:

40
6
89
70
5
3
11
12
29
23
2
32
8
36
19
13
20
22
28
25
24
33
15
38
30
39
18
60
26
43
48
4
47
55
35
31
44
14
7
63
53
1
59
65
100
41
10
57
16
17
34
58
46
42
96
51
9
66
64
77

result:

ok correct

Test #7:

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

input:

10 7
3 4
1 1
4 4
4 5
2 3
6 6
3 2
1 2
4 3
3 4
2 1 5 4 4 3 2

output:

5
2
4
1
3
7
8

result:

ok correct

Test #8:

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

input:

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

output:

1
4
2

result:

ok correct

Test #9:

score: -100
Time Limit Exceeded

input:

10000 10000
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
10 11
...

output:


result: