提出 #73329379


ソースコード 拡げる

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int z = 0;
    int l;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  for (int s = 1; s <= N;s++){
    l = s;
    z = 0;
   while(z <100){
      l = A.at(l-1);
      z++;
    }
    cout << l<<" ";
  }
  
}

提出情報

提出日時
問題 C - Sugoroku Destination
ユーザ noi65536
言語 C++23 (GCC 15.2.0)
得点 0
コード長 341 Byte
結果 WA
実行時間 229 ms
メモリ 5896 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 0 / 300
結果
AC × 3
AC × 17
WA × 1
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3420 KiB
00_sample_01.txt AC 1 ms 3516 KiB
00_sample_02.txt AC 1 ms 3516 KiB
01_random_03.txt AC 227 ms 5892 KiB
01_random_04.txt AC 228 ms 5896 KiB
01_random_05.txt AC 229 ms 5880 KiB
01_random_06.txt AC 227 ms 5884 KiB
01_random_07.txt AC 228 ms 5876 KiB
01_random_08.txt AC 227 ms 5892 KiB
01_random_09.txt AC 226 ms 5884 KiB
01_random_10.txt AC 228 ms 5880 KiB
01_random_11.txt AC 81 ms 4028 KiB
01_random_12.txt AC 69 ms 3844 KiB
01_random_13.txt AC 202 ms 5416 KiB
01_random_14.txt AC 14 ms 3652 KiB
01_random_15.txt AC 225 ms 5880 KiB
01_random_16.txt AC 2 ms 3492 KiB
01_random_17.txt WA 212 ms 5888 KiB