結果
問題 | No.182 新規性の虜 |
ユーザー |
|
提出日時 | 2015-08-03 18:05:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 147 ms / 5,000 ms |
コード長 | 557 bytes |
コンパイル時間 | 282 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 18,396 KB |
最終ジャッジ日時 | 2024-12-26 19:30:44 |
合計ジャッジ時間 | 3,428 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
#coding=UTF-8 #オーダーを下げられるように頑張る。 N=int(input()) mojir=input() hyo=mojir.split(" ") ans=0 #ここまでは新規性無し sortedlst=sorted(hyo) idx=0 while idx < len(sortedlst): if idx==len(sortedlst)-1: ans=ans+1 break elif sortedlst[idx+1] == sortedlst[idx]: idy=idx+1 while idy < len(sortedlst): if sortedlst[idy] != sortedlst[idx]: break idy=idy+1 idx=idy#新規性候補 else: ans=ans+1 idx=idx+1 print(ans)