結果

問題 No.2355 Unhappy Back Dance
ユーザー ニックネームニックネーム
提出日時 2023-06-16 23:16:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,503 ms / 6,000 ms
コード長 429 bytes
コンパイル時間 442 ms
コンパイル使用メモリ 86,724 KB
実行使用メモリ 80,068 KB
最終ジャッジ日時 2023-09-06 22:13:45
合計ジャッジ時間 23,837 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,136 KB
testcase_01 AC 76 ms
71,284 KB
testcase_02 AC 77 ms
70,968 KB
testcase_03 AC 74 ms
71,084 KB
testcase_04 AC 76 ms
71,232 KB
testcase_05 AC 75 ms
71,160 KB
testcase_06 AC 286 ms
77,408 KB
testcase_07 AC 286 ms
77,388 KB
testcase_08 AC 353 ms
77,864 KB
testcase_09 AC 355 ms
77,640 KB
testcase_10 AC 454 ms
78,324 KB
testcase_11 AC 475 ms
78,728 KB
testcase_12 AC 361 ms
77,556 KB
testcase_13 AC 361 ms
77,564 KB
testcase_14 AC 465 ms
78,548 KB
testcase_15 AC 78 ms
71,352 KB
testcase_16 AC 1,502 ms
79,900 KB
testcase_17 AC 1,499 ms
80,016 KB
testcase_18 AC 1,503 ms
80,068 KB
testcase_19 AC 1,496 ms
79,964 KB
testcase_20 AC 1,498 ms
80,016 KB
testcase_21 AC 684 ms
77,624 KB
testcase_22 AC 210 ms
76,880 KB
testcase_23 AC 217 ms
77,132 KB
testcase_24 AC 1,376 ms
79,904 KB
testcase_25 AC 787 ms
78,356 KB
testcase_26 AC 790 ms
78,268 KB
testcase_27 AC 690 ms
77,408 KB
testcase_28 AC 106 ms
75,968 KB
testcase_29 AC 125 ms
76,456 KB
testcase_30 AC 1,261 ms
78,700 KB
testcase_31 AC 950 ms
78,608 KB
testcase_32 AC 181 ms
76,884 KB
testcase_33 AC 579 ms
77,400 KB
testcase_34 AC 94 ms
75,976 KB
testcase_35 AC 104 ms
76,356 KB
testcase_36 AC 691 ms
77,676 KB
testcase_37 AC 424 ms
77,116 KB
testcase_38 AC 489 ms
77,040 KB
testcase_39 AC 409 ms
77,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd
n = int(input())
xy = [tuple(map(int,input().split())) for _ in range(n)]
ans = 0
for i,(ix,iy) in enumerate(xy):
    s = set()
    for j,(jx,jy) in enumerate(xy):
        dx = ix-jx; dy = iy-jy
        if dx==dy==0: s.add((0,0))
        elif dx==0: s.add((0,dy//abs(dy)))
        elif dy==0: s.add((dx//abs(dx),0))
        else: g = gcd(abs(dx),dy); s.add((dx//g,dy//g))
    if len(s)<n: ans += 1
print(ans)
0