编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#101421 #1152. 连连看 Wrong Answer 0 5321 ms 22892 K Python 3 / 802 B Austin4.5 2024-03-11 15:04:26
import bisect


n = int(input())
point = []
for i in range(n):
    point.append((i,) + tuple(int(i) for i in input().split()))
a = sorted(point, key=lambda i: i[1])
b = sorted(point, key=lambda i: i[2])
m = n // 2
move = []
for i in range(m):
    if (a[-1][1] - a[0][1] > b[-1][2] - b[0][2]):
        move.append((a[0][0] + 1, a[-1][0] + 1))
        del b[bisect.bisect_left(b, a[0][1], key=lambda i: i[1])]
        del b[bisect.bisect_left(b, a[-1][1], key=lambda i: i[1])]
        del a[0]
        del a[-1]
    else:
        move.append((b[0][0] + 1, b[-1][0] + 1))
        del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
        del a[bisect.bisect_left(a, b[-1][2], key=lambda i: i[2])]
        del b[0]
        del b[-1]
print(m)
for i in move:
    print(*i)
子任务 #1
Wrong Answer
得分:0
测试点 #1
Wrong Answer
得分:0
用时:287 ms
内存:22648 KiB

输入文件(input1.in

99994
39904 35083
46820 36679
18613 3814
6474 19631
37764 36525
18319 33414
45300 26489
21133 11529

<1155515 bytes omitted>

答案文件(input1.out

1665399942

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #2
Wrong Answer
得分:0
用时:283 ms
内存:22656 KiB

输入文件(input2.in

99966
29572 24605
33552 8402
18093 9640
547 31444
251 3309
43619 22874
32618 14747
3018 19766
37882 
<1155228 bytes omitted>

答案文件(input2.out

1664919648

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #3
Wrong Answer
得分:0
用时:275 ms
内存:22712 KiB

输入文件(input3.in

99959
24963 15592
20533 22230
22960 10397
32438 32270
16368 45627
25843 147
28835 6570
37998 16798
1
<1155287 bytes omitted>

答案文件(input3.out

1661963157

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #4
Wrong Answer
得分:0
用时:269 ms
内存:22684 KiB

输入文件(input4.in

99950
2417 45567
19300 44813
23263 44027
33863 2702
39461 4555
42612 32590
15374 27421
31106 10493
4
<1155004 bytes omitted>

答案文件(input4.out

1662916373

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #5
Wrong Answer
得分:0
用时:292 ms
内存:22744 KiB

输入文件(input5.in

99972
45280 44508
29577 24171
8151 8714
7100 44734
49861 28412
31199 14196
17156 34102
32122 48695
4
<1155310 bytes omitted>

答案文件(input5.out

1664148272

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #6
Wrong Answer
得分:0
用时:285 ms
内存:22716 KiB

输入文件(input7.in

99994
22203 12731
48860 13276
9330 45678
45445 29249
15122 11965
11386 19038
21223 30977
15157 31632
<1155538 bytes omitted>

答案文件(input7.out

1665321412

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #7
Wrong Answer
得分:0
用时:231 ms
内存:16260 KiB

输入文件(input8.in

99994
8 4
10 6
4 4
6 9
7 5
9 5
10 8
8 3
2 7
2 10
10 2
2 10
9 9
6 7
5 4
8 4
3 10
10 8
7 5
8 5
10 8
8 
<419780 bytes omitted>

答案文件(input8.out

330146

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #8
Wrong Answer
得分:0
用时:281 ms
内存:16292 KiB

输入文件(input9.in

99969
4 8
8 6
2 6
9 10
4 10
10 4
1 5
9 9
3 9
9 2
7 3
1 10
10 9
9 3
8 4
9 6
10 5
3 7
9 4
6 6
3 10
10 
<419576 bytes omitted>

答案文件(input9.out

329492

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #9
Wrong Answer
得分:0
用时:224 ms
内存:16280 KiB

输入文件(input10.in

99987
5 10
6 10
7 6
10 4
2 10
10 5
10 5
2 8
9 4
1 9
4 9
8 4
9 7
5 7
6 4
7 8
5 6
1 5
5 7
5 6
4 8
9 3

<419631 bytes omitted>

答案文件(input10.out

329440

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #10
Wrong Answer
得分:0
用时:220 ms
内存:16256 KiB

输入文件(input11.in

99987
8 8
6 10
9 8
6 7
7 4
3 8
1 7
5 8
5 7
8 8
9 3
1 5
3 10
10 8
1 5
3 7
10 4
9 2
4 1
7 6
2 1
1 10
4
<419934 bytes omitted>

答案文件(input11.out

330047

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #11
Wrong Answer
得分:0
用时:219 ms
内存:16268 KiB

输入文件(input12.in

99991
1 9
6 6
8 9
8 9
10 10
3 7
8 10
4 5
3 6
6 10
3 8
7 7
1 6
7 1
9 2
3 1
6 7
7 10
5 4
7 3
8 9
3 3
1
<419968 bytes omitted>

答案文件(input12.out

330232

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #12
Wrong Answer
得分:0
用时:236 ms
内存:16320 KiB

输入文件(input13.in

99981
2 5
7 10
9 9
9 8
3 10
10 1
5 4
9 10
7 7
9 2
3 3
5 8
10 9
6 10
3 4
1 6
2 1
8 7
9 1
2 9
1 1
3 10
<419894 bytes omitted>

答案文件(input13.out

329860

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #13
Wrong Answer
得分:0
用时:232 ms
内存:16212 KiB

输入文件(input14.in

99970
2 6
8 5
4 5
4 7
6 9
1 8
2 7
6 6
3 8
1 3
5 5
10 8
10 2
3 9
4 4
2 6
1 9
9 8
7 8
1 7
5 6
6 5
10 3
<419547 bytes omitted>

答案文件(input14.out

329442

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #14
Wrong Answer
得分:0
用时:272 ms
内存:22676 KiB

输入文件(input15.in

99951
43016666 705054189
23890816 191954409
48367680 178083192
65698935 509772667
809449080 63876393
<1972731 bytes omitted>

答案文件(input15.out

33839316800310

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 15, in <module>
    del b[bisect.bisect_left(b, a[0][1], key=lambda i: i[1])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #15
Wrong Answer
得分:0
用时:278 ms
内存:22892 KiB

输入文件(input16.in

99950
390196982 16217026
756299460 557589375
845307426 215064985
403301484 72900781
989173256 503715
<1973044 bytes omitted>

答案文件(input16.out

33893190316304

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #16
Wrong Answer
得分:0
用时:301 ms
内存:22744 KiB

输入文件(input17.in

99966
309713742 103345138
912956589 605640153
759597371 959523157
958180894 12282372
124979541 33724
<1973228 bytes omitted>

答案文件(input17.out

33869086670134

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 15, in <module>
    del b[bisect.bisect_left(b, a[0][1], key=lambda i: i[1])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #17
Wrong Answer
得分:0
用时:296 ms
内存:22680 KiB

输入文件(input18.in

99989
662308788 188157881
945161135 936031796
224331765 646572957
176241418 73020933
141324820 14925
<1973587 bytes omitted>

答案文件(input18.out

33895043667584

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 15, in <module>
    del b[bisect.bisect_left(b, a[0][1], key=lambda i: i[1])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #18
Wrong Answer
得分:0
用时:273 ms
内存:22672 KiB

输入文件(input19.in

99973
154453232 656240272
715155228 848233937
852480696 275617197
561544202 123073069
472873249 7570
<1973611 bytes omitted>

答案文件(input19.out

33855972714822

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #19
Wrong Answer
得分:0
用时:302 ms
内存:22740 KiB

输入文件(input20.in

99963
330145838 658516321
110794903 347274671
457221490 32851628
825966653 737106317
215914215 91143
<1973595 bytes omitted>

答案文件(input20.out

33750931421773

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1
测试点 #20
Wrong Answer
得分:0
用时:265 ms
内存:22664 KiB

输入文件(input21.in

99955
645861926 798882887
204604371 64809073
832321434 183260368
540647278 28314156
852540009 437805
<1973031 bytes omitted>

答案文件(input21.out

33814666330789

标准错误流

Traceback (most recent call last):
  File "/sandbox/2/a.py", line 21, in <module>
    del a[bisect.bisect_left(a, b[0][2], key=lambda i: i[2])]
TypeError: 'key' is an invalid keyword argument for bisect_left()

Special Judge 信息

Something is wrong...

系统信息

Exited with return code 1