結果
| 問題 | No.3650 Teleportation Cycles |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-07-20 18:41:04 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 170 bytes |
| 記録 | |
| コンパイル時間 | 318 ms |
| コンパイル使用メモリ | 95,724 KB |
| 実行使用メモリ | 149,120 KB |
| 最終ジャッジ日時 | 2026-08-28 20:59:01 |
| 合計ジャッジ時間 | 5,083 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 3 WA * 33 |
ソースコード
R=range
J=lambda:list(map(int,input().split()))
N,*_=J()
A=[0]+J()
F=[0]*(N+1)
a=0
for i in R(N):
S,j={},i
while F[j]<1:
F[j],S[j],j=1,1,A[j]
if j in S:a+=1
print(a)