結果

問題 No.55 正方形を描くだけの簡単なお仕事です。
ユーザー 👑 tatt61880tatt61880
提出日時 2021-03-20 18:14:21
言語 Kuin
(KuinC++ v.2021.9.17)
結果
WA  
実行時間 -
コード長 859 bytes
コンパイル時間 2,701 ms
コンパイル使用メモリ 157,428 KB
実行使用メモリ 4,376 KB
最終ジャッジ日時 2023-10-14 17:44:19
合計ジャッジ時間 3,401 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,372 KB
testcase_01 AC 2 ms
4,372 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 1 ms
4,368 KB
testcase_05 AC 2 ms
4,372 KB
testcase_06 AC 2 ms
4,368 KB
testcase_07 AC 1 ms
4,372 KB
testcase_08 AC 2 ms
4,372 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,376 KB
testcase_16 WA -
testcase_17 AC 2 ms
4,372 KB
testcase_18 AC 1 ms
4,372 KB
testcase_19 AC 2 ms
4,372 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var pos: []Pos :: #[3]Pos
	for i(0, 2)
		do pos[i] :: (#Pos).init(cui@inputInt(), cui@inputInt())
	end for
	for i(0, 2)
		if(i <> 0)
			var t: Pos :: ##pos[0]
			do pos[0].init(pos[i].x, pos[i].y)
			do pos[i].init(t.x, t.y)
		end if
		if((pos[1].x - pos[0].x) * (pos[2].x - pos[0].x) + (pos[1].y - pos[0].y) * (pos[2].y - pos[0].y) = 0)
			if((pos[1].x - pos[0].x) ^ 2 + (pos[1].y - pos[0].y) ^ 2 = (pos[2].x - pos[0].x) ^ 2 + (pos[2].y - pos[0].y) ^ 2)
				do cui@print("\{pos[2].x + pos[1].x - pos[0].x} \{pos[2].y + pos[1].y - pos[0].y}\n")
				ret
			end if
		end if
	end for
	do cui@print("-1\n")
	
	func swap(a: &Pos, b: &Pos)
		var pos: Pos :: ##a
		do a :: ##b
		do b :: ##pos
	end func
	
	class Pos()
		+var x: int
		+var y: int
		+func init(x: int, y: int): Pos
			do me.x :: x
			do me.y :: y
			ret me
		end func
	end class
end func
0