提出 #26774367
ソースコード 拡げる
N = int(input())
P = []
for _ in range(N):
P.append(list(map(int, input().split())))
count = 0
for i in range(N):
for j in range(i+1, N):
for k in range(j+1, N):
x1, y1 = P[i]
x2, y2 = P[j]
x3, y3 = P[k]
dx1 = x1 - x2
dx2 = x1 - x3
dy1 = y1 - y2
dy2 = y1 - y3
if dx2 * dy1 == dx1 * dy2:
continue
else:
count += 1
print(count)
提出情報
| 提出日時 | |
|---|---|
| 問題 | C - Triangle? |
| ユーザ | hnkz_hnkz |
| 言語 | PyPy3 (7.3.0) |
| 得点 | 300 |
| コード長 | 516 Byte |
| 結果 | AC |
| 実行時間 | 231 ms |
| メモリ | 74300 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 300 / 300 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample_01.txt, sample_02.txt |
| All | another_W_01.txt, another_W_02.txt, another_W_03.txt, another_W_04.txt, another_W_05.txt, sample_01.txt, sample_02.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| another_W_01.txt | AC | 231 ms | 74060 KiB |
| another_W_02.txt | AC | 210 ms | 74064 KiB |
| another_W_03.txt | AC | 217 ms | 74300 KiB |
| another_W_04.txt | AC | 211 ms | 74036 KiB |
| another_W_05.txt | AC | 208 ms | 73988 KiB |
| sample_01.txt | AC | 50 ms | 61704 KiB |
| sample_02.txt | AC | 51 ms | 64924 KiB |
| test_01.txt | AC | 48 ms | 61812 KiB |
| test_02.txt | AC | 53 ms | 61816 KiB |
| test_03.txt | AC | 51 ms | 61712 KiB |
| test_04.txt | AC | 70 ms | 73608 KiB |
| test_05.txt | AC | 131 ms | 73808 KiB |
| test_06.txt | AC | 60 ms | 67196 KiB |
| test_07.txt | AC | 209 ms | 74068 KiB |
| test_08.txt | AC | 210 ms | 73992 KiB |
| test_09.txt | AC | 208 ms | 73644 KiB |
| test_10.txt | AC | 217 ms | 73728 KiB |
| test_11.txt | AC | 213 ms | 74116 KiB |
| test_12.txt | AC | 211 ms | 74060 KiB |
| test_13.txt | AC | 212 ms | 73728 KiB |
| test_14.txt | AC | 214 ms | 74132 KiB |
| test_15.txt | AC | 203 ms | 73748 KiB |
| test_16.txt | AC | 201 ms | 73712 KiB |