結果
| 問題 |
No.250 atetubouのzetubou
|
| コンテスト | |
| ユーザー |
t_murano
|
| 提出日時 | 2015-07-25 00:22:50 |
| 言語 | Crystal (1.14.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 520 bytes |
| コンパイル時間 | 12,064 ms |
| コンパイル使用メモリ | 296,212 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-30 18:40:40 |
| 合計ジャッジ時間 | 12,229 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 RE * 1 |
| other | RE * 20 |
ソースコード
q = gets.not_nil!.chomp.to_i
q.times do
d64, x64, t = gets.not_nil!.chomp.split.map{|s| s.to_i64}
d = d64.to_i32
x = x64.to_i32
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