結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-15 19:17:36 |
| 言語 | Nim (2.2.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 540 bytes |
| コンパイル時間 | 3,479 ms |
| コンパイル使用メモリ | 75,888 KB |
| 実行使用メモリ | 16,684 KB |
| 最終ジャッジ日時 | 2024-06-30 02:40:16 |
| 合計ジャッジ時間 | 4,449 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 14 WA * 8 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 50) Warning: Use the new 'sugar' module instead; future is deprecated [Deprecated] /home/judge/data/code/Main.nim(1, 50) Warning: imported and not used: 'future' [UnusedImport] /home/judge/data/code/Main.nim(1, 26) Warning: imported and not used: 'strscans' [UnusedImport]
ソースコード
import sequtils,strutils,strscans,algorithm,math,future,macros import sets,tables,hashes template get*():string = stdin.readLine() #.strip() let N = get().parseInt L = get().split().map(parseInt) proc toCountedTable*[A](keys: openArray[A]): CountTable[A] = result = initCountTable[A](nextPowerOfTwo(keys.len * 3 div 2 + 4)) for key in items(keys): result[key] = 1 + (if key in result : result[key] else: 0) var ans :tuple[k,v:int]= (-1,0) for k,v in L.toCountedTable().pairs: if ans.v <= v and ans.k < k: ans = (k,v) echo ans.k