結果

問題 No.675 ドットちゃんたち
ユーザー cande398cande398
提出日時 2018-06-18 20:29:24
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 546 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,992 KB
実行使用メモリ 24,804 KB
最終ジャッジ日時 2023-09-13 06:55:18
合計ジャッジ時間 4,633 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,860 KB
testcase_01 AC 15 ms
7,800 KB
testcase_02 AC 16 ms
7,832 KB
testcase_03 AC 15 ms
7,816 KB
testcase_04 AC 15 ms
7,816 KB
testcase_05 AC 436 ms
18,564 KB
testcase_06 AC 475 ms
24,660 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

command = []
rev = False
N, Px, Py = map(int, input().split())
Fx, Fy = Px, Py
for i in range(N):
	command.append(list(map(int, input().split())))
	if command[-1][0] == 1:
		Fx = Fx+command[-1][1]
	elif command[-1][0] == 2:
		Fy = Fy+command[-1][1]
	else:
		rev = not rev
		Fx, Fy = Fy, 0-Fx
for i in range(N):
	print(Fx, Fy)
	if command[i][0] == 1:
		if rev:
			Fy += command[i][1]
		else:
			Fx -= command[i][1]
	elif command[i][0] == 2:
		if rev:
			Fx -= command[i][1]
		else:
			Fy -= command[i][1]
	else:
		Fx, Fy = 0-Fy, Fx
		rev = not rev
0