結果

問題 No.2247 01 ZigZag
ユーザー flygonflygon
提出日時 2023-03-17 21:46:27
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 551 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 81,812 KB
実行使用メモリ 258,672 KB
最終ジャッジ日時 2023-10-18 14:19:53
合計ジャッジ時間 12,076 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,460 KB
testcase_01 AC 37 ms
53,460 KB
testcase_02 AC 37 ms
53,460 KB
testcase_03 AC 355 ms
87,816 KB
testcase_04 AC 38 ms
53,460 KB
testcase_05 AC 62 ms
75,460 KB
testcase_06 AC 150 ms
77,976 KB
testcase_07 AC 37 ms
53,460 KB
testcase_08 AC 250 ms
82,036 KB
testcase_09 AC 484 ms
97,344 KB
testcase_10 AC 38 ms
53,460 KB
testcase_11 AC 145 ms
77,772 KB
testcase_12 AC 145 ms
80,084 KB
testcase_13 AC 119 ms
77,036 KB
testcase_14 AC 37 ms
53,460 KB
testcase_15 AC 100 ms
77,688 KB
testcase_16 AC 265 ms
90,552 KB
testcase_17 AC 846 ms
128,212 KB
testcase_18 AC 38 ms
53,460 KB
testcase_19 AC 37 ms
53,460 KB
testcase_20 AC 37 ms
53,460 KB
testcase_21 AC 80 ms
75,800 KB
testcase_22 AC 324 ms
89,316 KB
testcase_23 AC 121 ms
76,928 KB
testcase_24 AC 36 ms
53,460 KB
testcase_25 AC 585 ms
110,984 KB
testcase_26 AC 315 ms
90,504 KB
testcase_27 AC 44 ms
68,048 KB
testcase_28 AC 352 ms
89,600 KB
testcase_29 AC 513 ms
98,988 KB
testcase_30 AC 506 ms
100,284 KB
testcase_31 AC 37 ms
53,460 KB
testcase_32 AC 316 ms
86,204 KB
testcase_33 AC 143 ms
77,656 KB
testcase_34 AC 86 ms
76,012 KB
testcase_35 AC 56 ms
75,324 KB
testcase_36 AC 197 ms
79,944 KB
testcase_37 AC 72 ms
75,604 KB
testcase_38 AC 75 ms
75,604 KB
testcase_39 AC 135 ms
77,488 KB
testcase_40 AC 37 ms
53,460 KB
testcase_41 RE -
testcase_42 RE -
testcase_43 AC 37 ms
53,460 KB
testcase_44 AC 37 ms
53,460 KB
testcase_45 AC 1,386 ms
258,540 KB
testcase_46 AC 1,327 ms
258,672 KB
testcase_47 RE -
testcase_48 RE -
testcase_49 AC 37 ms
53,460 KB
testcase_50 AC 37 ms
53,460 KB
testcase_51 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,k = map(int,input().split())
num = min(n,m)*2 - (n==m) 
if num < k:
  print(-1)
  exit()
elif num == k:
  if n >= m:
    l = [0,1] *( (k+1)//2 )
  else:
    l = [1,0] * ((k+1)//2)
  if k % 2 == 0:
    l.append(l[0])
else:
  l = [0,1] *( (k+1)//2 )
  if k % 2 == 0:
    l.append(l[0])

cnt = [1]*len(l)
n -= l.count(0)
m -= l.count(1)
for i in range(len(l)):
  if l[i] == 0:
    cnt[i] += n
    break
for i in range(len(l))[::-1]:
  if l[i] == 1:
    cnt[i] += m
    break
  
ans = ""
for i in range(len(l)):
  ans += str(l[i]) * cnt[i]

print(ans)
0