結果
| 問題 |
No.628 Tagの勢い
|
| コンテスト | |
| ユーザー |
tak
|
| 提出日時 | 2018-03-20 00:25:32 |
| 言語 | F# (F# 4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 736 bytes |
| コンパイル時間 | 11,774 ms |
| コンパイル使用メモリ | 184,660 KB |
| 実行使用メモリ | 36,576 KB |
| 最終ジャッジ日時 | 2024-10-07 22:38:01 |
| 合計ジャッジ時間 | 19,617 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 11 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (325 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
open System
open System.Collections.Generic
open System.Linq
let read() = Console.ReadLine()
let Int () = read() |> int
let Ints() = read().Split()
|> Array.map(int)
let Int2() =
let t = Ints()
t.[0],t.[1]
let dict = Dictionary<string,int>()
let N = Int()
for i in 1..N do
let No = Int()
let M,S = Int2()
let tags = read().Split()
for t in tags do
if not <| dict.ContainsKey t then
dict.[t] <- S
else
dict.[t] <- dict.[t] + S
dict.OrderByDescending(fun kp -> kp.Value).ThenBy(fun kp -> kp.Value).Take(10)
|> Seq.iter (fun kp -> printfn "%s %i" kp.Key kp.Value)
tak