結果
| 問題 | No.232 めぐるはめぐる (2) | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2015-06-27 01:23:24 | 
| 言語 | Ruby (3.4.1) | 
| 結果 | 
                                WA
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 533 bytes | 
| コンパイル時間 | 138 ms | 
| コンパイル使用メモリ | 7,552 KB | 
| 実行使用メモリ | 12,544 KB | 
| 最終ジャッジ日時 | 2024-07-07 19:50:16 | 
| 合計ジャッジ時間 | 4,064 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 19 WA * 3 | 
コンパイルメッセージ
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
	elsif (t-a-b)%2==0 and t>a+b
		output '>'
		output '^'
		a-=1
		b-=1
	end
	n=[a,b].min
	n.times{
		output '^>'
	}
	a-=n
	b-=n
	a.times{
		output '^'
	}
	b.times{
		output '>'
	}
	((t-$lineno)/2).times{
		output '^'
		output 'v'
	}
end
            
            
            
        