結果
問題 | No.1013 〇マス進む |
ユーザー | iqueue02 |
提出日時 | 2020-03-21 10:34:09 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 651 bytes |
コンパイル時間 | 2,077 ms |
コンパイル使用メモリ | 168,516 KB |
実行使用メモリ | 16,908 KB |
最終ジャッジ日時 | 2023-08-22 22:26:48 |
合計ジャッジ時間 | 10,814 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 2 ms
4,376 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | AC | 2 ms
4,376 KB |
testcase_04 | AC | 2 ms
4,380 KB |
testcase_05 | AC | 2 ms
4,376 KB |
testcase_06 | AC | 2 ms
4,380 KB |
testcase_07 | AC | 2 ms
4,376 KB |
testcase_08 | AC | 2 ms
4,376 KB |
testcase_09 | AC | 3 ms
4,376 KB |
testcase_10 | AC | 3 ms
4,380 KB |
testcase_11 | AC | 3 ms
4,376 KB |
testcase_12 | AC | 3 ms
4,376 KB |
testcase_13 | AC | 8 ms
4,376 KB |
testcase_14 | AC | 91 ms
9,716 KB |
testcase_15 | AC | 153 ms
13,584 KB |
testcase_16 | AC | 136 ms
12,772 KB |
testcase_17 | AC | 81 ms
8,916 KB |
testcase_18 | AC | 102 ms
9,864 KB |
testcase_19 | AC | 58 ms
7,312 KB |
testcase_20 | AC | 188 ms
16,116 KB |
testcase_21 | AC | 74 ms
8,468 KB |
testcase_22 | AC | 105 ms
10,512 KB |
testcase_23 | AC | 33 ms
5,480 KB |
testcase_24 | AC | 191 ms
16,500 KB |
testcase_25 | AC | 185 ms
16,236 KB |
testcase_26 | AC | 34 ms
5,464 KB |
testcase_27 | AC | 69 ms
8,088 KB |
testcase_28 | AC | 34 ms
5,556 KB |
testcase_29 | AC | 182 ms
15,632 KB |
testcase_30 | AC | 65 ms
7,668 KB |
testcase_31 | AC | 121 ms
11,400 KB |
testcase_32 | AC | 87 ms
9,332 KB |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | WA | - |
testcase_41 | WA | - |
testcase_42 | WA | - |
testcase_43 | WA | - |
testcase_44 | WA | - |
testcase_45 | WA | - |
testcase_46 | WA | - |
testcase_47 | WA | - |
testcase_48 | WA | - |
testcase_49 | WA | - |
testcase_50 | WA | - |
testcase_51 | WA | - |
testcase_52 | WA | - |
testcase_53 | WA | - |
testcase_54 | WA | - |
testcase_55 | WA | - |
testcase_56 | WA | - |
testcase_57 | WA | - |
testcase_58 | WA | - |
testcase_59 | WA | - |
testcase_60 | WA | - |
testcase_61 | AC | 191 ms
16,844 KB |
testcase_62 | AC | 180 ms
16,732 KB |
testcase_63 | AC | 2 ms
4,376 KB |
testcase_64 | AC | 2 ms
4,376 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair<int,int> P; int main(){ int n, k; cin >> n >> k; vector<int> p(n); rep(i,n) cin >> p[i]; vector<vector<int>> to(33, vector<int>(n)); for (int i = 0; i < n; i++) to[0][i] = p[i]; for (int i = 0; i < 32; i++) { for (int j = 0; j < n; j++) to[i + 1][j] = to[i][j] + to[i][(j + to[i][j]) % n]; } for (int i = 0; i < n; i++) { ll res = i; for (int j = 0; j < 32; j++) { if (k & (1 << j)) res += to[j][res % n]; } cout << res + 1 << endl; } return 0; }