結果
問題 |
No.8016 unordered_mapなるたけ落とすマン
|
ユーザー |
![]() |
提出日時 | 2016-05-22 00:53:39 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 224 ms / 1,000 ms |
コード長 | 874 bytes |
コンパイル時間 | 138 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 35,948 KB |
最終ジャッジ日時 | 2024-10-07 05:55:38 |
合計ジャッジ時間 | 12,210 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 48 |
ソースコード
import collections class Io: def __init__(self): self.tokens_index = 0 self.tokens = [] def next_line(self): assert self.tokens_index >= len(self.tokens) return input() def next(self): if self.tokens_index < len(self.tokens): token = self.tokens[self.tokens_index] self.tokens_index += 1 return token else: self.tokens = self.next_line().split() self.tokens_index = 0 return self.next() def next_int(self): return int(self.next()) def next_float(self): return float(self.next()) def main(): io = Io() n = io.next_int() m = io.next_int() c = collections.Counter(io.next_int() for i in range(n)) print(' '.join(str(c[io.next_int()]) for i in range(m))) if __name__ == '__main__': main()