結果
問題 | No.706 多眼生物の調査 |
ユーザー | GrayCoder |
提出日時 | 2018-06-29 22:36:25 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 20 ms / 2,000 ms |
コード長 | 426 bytes |
コンパイル時間 | 83 ms |
コンパイル使用メモリ | 10,744 KB |
実行使用メモリ | 9,408 KB |
最終ジャッジ日時 | 2023-09-13 15:23:59 |
合計ジャッジ時間 | 848 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 20 ms
8,492 KB |
testcase_01 | AC | 17 ms
8,460 KB |
testcase_02 | AC | 18 ms
8,492 KB |
testcase_03 | AC | 18 ms
8,504 KB |
testcase_04 | AC | 19 ms
8,620 KB |
testcase_05 | AC | 19 ms
8,828 KB |
testcase_06 | AC | 20 ms
9,408 KB |
testcase_07 | AC | 18 ms
8,492 KB |
ソースコード
from collections import Counter, defaultdict, deque from sys import stdin, stdout input = lambda: stdin.readline().rstrip() write = stdout.write def main(): N = int(input()) S = stdin.read().splitlines() counter = Counter(S) topn = counter.most_common() maxn, eyes = 0, 0 for s, i in topn: if maxn <= i: maxn = i eyes = max(eyes, s.count('^')) print(eyes) main()