結果
問題 | No.182 新規性の虜 |
ユーザー | iad_2889 |
提出日時 | 2019-05-02 03:58:10 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 478 bytes |
コンパイル時間 | 283 ms |
コンパイル使用メモリ | 10,724 KB |
実行使用メモリ | 24,712 KB |
最終ジャッジ日時 | 2023-08-30 04:36:03 |
合計ジャッジ時間 | 7,735 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,792 KB |
testcase_01 | AC | 16 ms
7,916 KB |
testcase_02 | AC | 16 ms
7,948 KB |
testcase_03 | AC | 16 ms
7,820 KB |
testcase_04 | AC | 15 ms
7,868 KB |
testcase_05 | AC | 16 ms
7,776 KB |
testcase_06 | AC | 16 ms
7,856 KB |
testcase_07 | AC | 16 ms
7,768 KB |
testcase_08 | AC | 41 ms
15,184 KB |
testcase_09 | TLE | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
evil01.txt | -- | - |
evil02.txt | -- | - |
ソースコード
N = int(input()) nums = [int(x) for x in input().split()] num_type = set(nums) if len(num_type) == N: newly = N else: newly = 0 current = None while nums: current = nums.pop(0) if current in nums: idxs = [] for idx,num in enumerate(nums): if num == current: idxs.insert(0,idx) for idx in idxs: del nums[idx] else: newly +=1 print(newly)