結果
問題 | No.1149 色塗りゲーム |
ユーザー |
|
提出日時 | 2021-06-14 16:14:42 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 180 ms / 2,000 ms |
コード長 | 524 bytes |
コンパイル時間 | 258 ms |
コンパイル使用メモリ | 82,496 KB |
実行使用メモリ | 71,128 KB |
平均クエリ数 | 19.88 |
最終ジャッジ日時 | 2024-07-17 11:32:06 |
合計ジャッジ時間 | 9,254 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
n=int(input())mat=["-"]*nif n%2==1:k,x=1,(n+1)//2else:k,x=2,(n+1)//2print(k,x)for i in range(k):mat[x-1+i]="o"#print(mat)while True:t=int(input())if t==0 or t==1:breakk,x=map(int,input().split())for i in range(k):mat[x-1+i]="o"#print(mat)if t==2:breakif n%2==0:if x<(n+1)//2:x = (n+1)//2 + 1 + xelse:x = x - (n+1)//2 - 1else:if x<(n+1)//2:x = (n+1)//2 + xelse:x = x - (n+1)//2print(k,x)for i in range(k):mat[x-1+i]="o"#print(mat)