結果
問題 | No.232 めぐるはめぐる (2) |
ユーザー | ciel |
提出日時 | 2015-06-27 00:21:48 |
言語 | Ruby (3.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 511 bytes |
コンパイル時間 | 222 ms |
コンパイル使用メモリ | 11,396 KB |
実行使用メモリ | 15,420 KB |
最終ジャッジ日時 | 2023-09-22 02:49:14 |
合計ジャッジ時間 | 5,587 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 137 ms
15,164 KB |
testcase_01 | AC | 138 ms
15,160 KB |
testcase_02 | WA | - |
testcase_03 | AC | 135 ms
15,324 KB |
testcase_04 | AC | 84 ms
15,140 KB |
testcase_05 | AC | 87 ms
15,320 KB |
testcase_06 | AC | 82 ms
15,176 KB |
testcase_07 | AC | 83 ms
15,284 KB |
testcase_08 | AC | 121 ms
15,252 KB |
testcase_09 | AC | 82 ms
15,124 KB |
testcase_10 | WA | - |
testcase_11 | AC | 84 ms
15,136 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 84 ms
15,304 KB |
testcase_16 | AC | 88 ms
15,212 KB |
testcase_17 | WA | - |
testcase_18 | AC | 87 ms
15,140 KB |
testcase_19 | AC | 92 ms
15,048 KB |
testcase_20 | AC | 84 ms
15,144 KB |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | AC | 83 ms
15,288 KB |
testcase_24 | WA | - |
コンパイルメッセージ
Syntax OK
ソースコード
#!/usr/bin/ruby $lineno=0 def output(s) puts s $lineno+=1 end t,a,b=gets.split.map &:to_i if [a,b].max>t || (t==1 and a==0 and b==0) puts :NO else puts :YES if a==0 if (b-t)%2>0 output '^' output 'v>' b-=1 end elsif b==0 if (a-t)%2>0 output '>' output '<^' a-=1 end end n=[a,b].min if n%2>0 output '^' output '>' n-=1 end n.times{ output '^>' } a-=n b-=n a.times{ output '^' } b.times{ output '>' } ((t-$lineno)/2).times{ output '^' output 'v' } end