結果
| 問題 | 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]*n
ma=[-1]*m
people=m.times.map{[]}
n.times{|i|
m.times{|j|
if ma[j]<a[i][j]
people[j].each{|e|
deg[e]-=1
r-=1 if deg[e]==0
}
people[j]=[]
ma[j]=a[i][j]
end
if ma[j]==a[i][j]
deg[i]+=1
r+=1 if deg[i]==1
people[j]<<i
end
}
p r
}