結果
| 問題 |
No.3217 Shiki no Shiki
|
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2025-08-01 21:50:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 82 ms / 2,000 ms |
| コード長 | 230 bytes |
| コンパイル時間 | 263 ms |
| コンパイル使用メモリ | 82,840 KB |
| 実行使用メモリ | 98,984 KB |
| 最終ジャッジ日時 | 2025-08-01 21:50:50 |
| 合計ジャッジ時間 | 3,356 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 |
ソースコード
n=int(input()) p=[0]+list(map(int,input().split())) d=[0]*(n+1) for i in range(1,n+1): d[p[i]]=1 v=[0]*(n+1) q=[i for i in range(1,n+1) if d[i]==0] q=[p[s] for s in q if p[s]!=0] q=[p[s] for s in q if p[s]!=0] print(len(set(q)))
sasa8uyauya