結果
| 問題 | No.498 ワープクリスタル (給料日編) |
| コンテスト | |
| ユーザー |
miraxial
|
| 提出日時 | 2017-03-25 00:11:49 |
| 言語 | Ruby (4.0.2) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 575 bytes |
| 記録 | |
| コンパイル時間 | 88 ms |
| コンパイル使用メモリ | 9,216 KB |
| 実行使用メモリ | 702,492 KB |
| 最終ジャッジ日時 | 2026-03-27 13:23:02 |
| 合計ジャッジ時間 | 8,857 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 1 WA * 8 TLE * 9 MLE * 3 |
コンパイルメッセージ
Main.rb:6: warning: assigned but unused variable - r Syntax OK
ソースコード
gx,gy,n=gets.split.map &:to_i
a=$<.map{|e|e.split.map &:to_i}
h=Hash.new []
hh=Hash.new []
n.times do |i|
r=[]
h.each do |e,v|
a[i][2].times do |j|
g=[e[0]+a[i][0]*(j+1),e[1]+a[i][1]*(j+1)]
hh[g]=hh[g]+v.map{|e|e+[i]*(j+1)}
end
end
a[i][2].times do |j|
hh[[a[i][0]*(j+1),a[i][1]*(j+1)]]=hh[[a[i][0]*(j+1),a[i][1]*(j+1)]]+[[i]*(j+1)]
end
h=hh.dup
end
c=0
b=[0,1]
2.upto(50) do |e|
b<< b[-1]*e
end
h[[gx,gy]].each do |e|
hh=Hash.new 0
e.each do |ee|
hh[ee]+=1
end
g=b[e.size]
hh.each do |ee,vv|
g/=vv
end
c+=g
end
p c
miraxial