結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
t_murano
|
| 提出日時 | 2015-07-24 23:55:53 |
| 言語 | Crystal (1.14.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 482 bytes |
| コンパイル時間 | 10,995 ms |
| コンパイル使用メモリ | 296,276 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-30 18:40:26 |
| 合計ジャッジ時間 | 12,485 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 1 |
| other | RE * 20 |
ソースコード
q = gets.not_nil!.chomp.to_i
q.times do
d, x, t = gets.not_nil!.chomp.split.map{|s| s.to_i}
dp = Array.new(x+1, 1)
(d-2).times do
next_dp = Array.new(x+1, 0)
dp.each_with_index do |v, i|
(x+1).times do |j|
# puts "i:#{i} j:#{j}"
next_dp[j + i] += v if i + j <= x
end
end
# puts next_dp
dp = next_dp
end
count = d == 1 ? 1 : dp.sum
# puts "count:#{count}"
if count > t
puts "ZETUBOU"
else
puts "AC"
end
end
t_murano