結果
問題 | No.55 正方形を描くだけの簡単なお仕事です。 |
ユーザー | 👑 tatt61880 |
提出日時 | 2021-03-20 17:58:32 |
言語 | Kuin (KuinC++ v.2021.9.17) |
結果 |
WA
|
実行時間 | - |
コード長 | 737 bytes |
コンパイル時間 | 2,565 ms |
コンパイル使用メモリ | 152,804 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-10-14 17:44:03 |
合計ジャッジ時間 | 3,753 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,368 KB |
testcase_01 | AC | 2 ms
4,372 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 2 ms
4,368 KB |
testcase_05 | AC | 2 ms
4,372 KB |
testcase_06 | AC | 2 ms
4,368 KB |
testcase_07 | AC | 2 ms
4,372 KB |
testcase_08 | AC | 2 ms
4,368 KB |
testcase_09 | AC | 2 ms
4,368 KB |
testcase_10 | AC | 2 ms
4,368 KB |
testcase_11 | WA | - |
testcase_12 | AC | 2 ms
4,368 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 2 ms
4,368 KB |
testcase_16 | WA | - |
testcase_17 | AC | 2 ms
4,372 KB |
testcase_18 | AC | 2 ms
4,372 KB |
testcase_19 | AC | 2 ms
4,368 KB |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
ソースコード
func main() var pos: [][]int :: #[3, 2]int for i(0, 2) do pos[i] :: [cui@inputInt(), cui@inputInt()] end for for i(0, 2) if(i <> 0) do swap(&pos[i], &pos[0]) end if if((pos[1][0] - pos[0][0]) * (pos[2][0] - pos[0][0]) + (pos[1][1] - pos[0][1]) * (pos[2][1] - pos[0][1]) = 0) if((pos[1][0] - pos[0][0]) ^ 2 + (pos[1][1] - pos[0][1]) ^ 2 = (pos[2][0] - pos[0][0]) ^ 2 + (pos[2][1] - pos[0][1]) ^ 2) do cui@print("\{pos[2][0] + pos[1][0] - pos[0][0]} \{pos[2][1] + pos[1][1] - pos[0][1]}\n") ret end if end if end for do cui@print("-1\n") func swap(a: &[]int, b: &[]int) var ax: int :: a[0] var ay: int :: a[1] do a[0] :: b[0] do a[1] :: b[1] do b[0] :: ax do b[1] :: ay end func end func