結果

問題 No.1149 色塗りゲーム
ユーザー persimmon-persimmonpersimmon-persimmon
提出日時 2021-06-14 16:14:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 174 ms / 2,000 ms
コード長 524 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 87,188 KB
実行使用メモリ 87,848 KB
平均クエリ数 19.88
最終ジャッジ日時 2023-09-24 10:40:55
合計ジャッジ時間 9,937 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
87,036 KB
testcase_01 AC 104 ms
87,688 KB
testcase_02 AC 104 ms
87,136 KB
testcase_03 AC 105 ms
87,012 KB
testcase_04 AC 106 ms
87,180 KB
testcase_05 AC 107 ms
87,676 KB
testcase_06 AC 106 ms
87,344 KB
testcase_07 AC 104 ms
87,400 KB
testcase_08 AC 105 ms
87,392 KB
testcase_09 AC 104 ms
87,244 KB
testcase_10 AC 106 ms
87,360 KB
testcase_11 AC 106 ms
87,692 KB
testcase_12 AC 105 ms
87,456 KB
testcase_13 AC 105 ms
87,688 KB
testcase_14 AC 106 ms
87,776 KB
testcase_15 AC 109 ms
87,352 KB
testcase_16 AC 105 ms
87,848 KB
testcase_17 AC 107 ms
86,680 KB
testcase_18 AC 107 ms
87,596 KB
testcase_19 AC 108 ms
87,504 KB
testcase_20 AC 107 ms
87,344 KB
testcase_21 AC 107 ms
86,928 KB
testcase_22 AC 107 ms
87,092 KB
testcase_23 AC 108 ms
87,416 KB
testcase_24 AC 110 ms
87,156 KB
testcase_25 AC 107 ms
87,228 KB
testcase_26 AC 109 ms
87,504 KB
testcase_27 AC 111 ms
87,240 KB
testcase_28 AC 108 ms
87,092 KB
testcase_29 AC 111 ms
86,900 KB
testcase_30 AC 144 ms
87,148 KB
testcase_31 AC 139 ms
87,596 KB
testcase_32 AC 146 ms
87,176 KB
testcase_33 AC 141 ms
86,912 KB
testcase_34 AC 150 ms
87,544 KB
testcase_35 AC 146 ms
87,156 KB
testcase_36 AC 157 ms
87,264 KB
testcase_37 AC 154 ms
87,164 KB
testcase_38 AC 153 ms
87,296 KB
testcase_39 AC 162 ms
86,988 KB
testcase_40 AC 166 ms
87,180 KB
testcase_41 AC 167 ms
87,344 KB
testcase_42 AC 170 ms
87,420 KB
testcase_43 AC 163 ms
87,772 KB
testcase_44 AC 171 ms
87,684 KB
testcase_45 AC 169 ms
87,652 KB
testcase_46 AC 166 ms
87,556 KB
testcase_47 AC 162 ms
87,552 KB
testcase_48 AC 169 ms
87,308 KB
testcase_49 AC 174 ms
87,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
mat=["-"]*n
if n%2==1:
  k,x=1,(n+1)//2
else:
  k,x=2,(n+1)//2
print(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:break
  k,x=map(int,input().split())
  for i in range(k):mat[x-1+i]="o"
  #print(mat)
  if t==2:break
  if n%2==0:
    if x<(n+1)//2:
      x = (n+1)//2 + 1 + x
    else:
      x = x - (n+1)//2 - 1
  else:
    if x<(n+1)//2:
      x = (n+1)//2 + x
    else:
      x = x - (n+1)//2
  print(k,x)
  for i in range(k):mat[x-1+i]="o"
  #print(mat)
0