結果
問題 |
No.1133 キムワイプイーター
|
ユーザー |
![]() |
提出日時 | 2022-09-06 22:46:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 261 ms / 2,000 ms |
コード長 | 395 bytes |
コンパイル時間 | 183 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 13,312 KB |
最終ジャッジ日時 | 2024-11-21 22:51:02 |
合計ジャッジ時間 | 5,467 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 31 |
ソースコード
import sys readline=sys.stdin.readline write=sys.stdout.write from math import gcd as GCD import math N,M=map(int,readline().split()) ans_lst=[[1]*(N+1) for i in range(N+1)] x,y=N,0 ans_lst[x][y]=0 for s in readline().rstrip(): if s=="R": y+=1 elif s=="L": y-=1 elif s=="U": x-=1 else: x+=1 ans_lst[x][y]=0 for ans in ans_lst: print(*ans)