結果
| 問題 |
No.1013 〇マス進む
|
| コンテスト | |
| ユーザー |
otamay6
|
| 提出日時 | 2019-11-08 14:34:23 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 543 bytes |
| コンパイル時間 | 1,605 ms |
| コンパイル使用メモリ | 169,816 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-09-15 04:25:49 |
| 合計ジャッジ時間 | 18,028 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 TLE * 1 -- * 31 |
ソースコード
#include<bits/stdc++.h>
#define REP(i,n) for(int i=0,i##_len=(n);i<i##_len;++i)
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
#define All(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
vector<ll> Gutyoku(ll N,ll K,const vector<ll> p){
vector<ll> ret(N);
REP(i,N){
ll tmp=i;
REP(j,K) tmp+=p[tmp%N];
ret[i]=tmp+1;
}
return ret;
}
int main(){
ll N,K;cin>>N>>K;
vector<ll> p(N);
REP(i,N) cin>>p[i];
vector<ll> ans=Gutyoku(N,K,p);
REP(i,N) cout<<ans[i]<<endl;
}
otamay6