結果
問題 | No.709 優勝可能性 |
ユーザー |
|
提出日時 | 2018-07-08 00:32:47 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 983 ms / 3,500 ms |
コード長 | 315 bytes |
コンパイル時間 | 40 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 41,600 KB |
最終ジャッジ日時 | 2024-07-05 20:38:48 |
合計ジャッジ時間 | 11,722 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
コンパイルメッセージ
Syntax OK
ソースコード
(n,m),*a=$<.map{|e|e.split.map &:to_i}deg=[r=0]*nma=[-1]*mpeople=m.times.map{[]}n.times{|i|m.times{|j|if ma[j]<a[i][j]people[j].each{|e|deg[e]-=1r-=1 if deg[e]==0}people[j]=[]ma[j]=a[i][j]endif ma[j]==a[i][j]deg[i]+=1r+=1 if deg[i]==1people[j]<<iend}p r}