結果
問題 |
No.675 ドットちゃんたち
|
ユーザー |
![]() |
提出日時 | 2023-09-14 08:48:58 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 430 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 98,252 KB |
最終ジャッジ日時 | 2024-07-01 16:09:55 |
合計ジャッジ時間 | 3,585 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 3 WA * 5 |
ソースコード
N, px, py = map(int, input().split()) C = [] for i in range(N): C.append(list(map(int, input().split()))) C.reverse() n = 0 def rot(x, y): return y, -x ans = [] for c in C: if c[0] == 3: n = (n + 1) % 4 elif c[0] == 1: px += c[1] else: py += c[1] x, y = px, py for _ in range(n): x, y = rot(x, y) ans.append((x, y)) ans.reverse() for x, y in ans: print(x, y)