結果

問題 No.1013 〇マス進む
ユーザー n_vipn_vip
提出日時 2020-03-20 21:29:10
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 2,039 bytes
コンパイル時間 1,484 ms
コンパイル使用メモリ 132,448 KB
実行使用メモリ 32,764 KB
最終ジャッジ日時 2023-08-21 15:14:00
合計ジャッジ時間 12,192 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
29,980 KB
testcase_01 AC 7 ms
29,976 KB
testcase_02 AC 7 ms
29,960 KB
testcase_03 AC 7 ms
30,036 KB
testcase_04 AC 7 ms
29,960 KB
testcase_05 AC 7 ms
30,000 KB
testcase_06 AC 7 ms
30,036 KB
testcase_07 AC 7 ms
30,024 KB
testcase_08 AC 7 ms
30,012 KB
testcase_09 AC 7 ms
30,060 KB
testcase_10 AC 7 ms
29,944 KB
testcase_11 AC 7 ms
30,308 KB
testcase_12 AC 8 ms
30,060 KB
testcase_13 AC 9 ms
30,280 KB
testcase_14 AC 38 ms
31,180 KB
testcase_15 AC 63 ms
31,996 KB
testcase_16 AC 55 ms
31,884 KB
testcase_17 AC 34 ms
31,200 KB
testcase_18 AC 45 ms
31,400 KB
testcase_19 AC 27 ms
30,840 KB
testcase_20 AC 73 ms
32,452 KB
testcase_21 AC 32 ms
31,020 KB
testcase_22 AC 44 ms
31,520 KB
testcase_23 AC 17 ms
30,476 KB
testcase_24 AC 72 ms
32,436 KB
testcase_25 AC 72 ms
32,492 KB
testcase_26 AC 19 ms
30,384 KB
testcase_27 AC 29 ms
30,984 KB
testcase_28 AC 18 ms
30,508 KB
testcase_29 AC 68 ms
32,500 KB
testcase_30 AC 30 ms
31,012 KB
testcase_31 AC 48 ms
31,704 KB
testcase_32 AC 34 ms
31,156 KB
testcase_33 AC 43 ms
31,124 KB
testcase_34 AC 71 ms
31,924 KB
testcase_35 AC 74 ms
31,660 KB
testcase_36 AC 11 ms
30,088 KB
testcase_37 AC 11 ms
30,180 KB
testcase_38 AC 74 ms
32,184 KB
testcase_39 AC 33 ms
30,720 KB
testcase_40 AC 85 ms
31,944 KB
testcase_41 AC 24 ms
30,440 KB
testcase_42 AC 48 ms
31,116 KB
testcase_43 AC 31 ms
31,040 KB
testcase_44 AC 46 ms
31,100 KB
testcase_45 AC 42 ms
31,200 KB
testcase_46 AC 26 ms
30,524 KB
testcase_47 AC 43 ms
31,148 KB
testcase_48 AC 49 ms
31,460 KB
testcase_49 AC 88 ms
32,012 KB
testcase_50 AC 61 ms
31,736 KB
testcase_51 AC 55 ms
31,364 KB
testcase_52 AC 18 ms
30,340 KB
testcase_53 AC 21 ms
30,492 KB
testcase_54 AC 63 ms
31,660 KB
testcase_55 AC 29 ms
30,536 KB
testcase_56 AC 96 ms
32,188 KB
testcase_57 AC 72 ms
31,360 KB
testcase_58 AC 120 ms
32,764 KB
testcase_59 AC 115 ms
32,760 KB
testcase_60 AC 93 ms
32,760 KB
testcase_61 AC 68 ms
32,760 KB
testcase_62 AC 62 ms
32,760 KB
testcase_63 AC 7 ms
29,976 KB
testcase_64 AC 7 ms
29,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <string>
#include <vector>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<functional>
#include<list>
#include<deque>
#include<bitset>
#include<set>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<cstring>
#include<sstream>
#include<complex>
#include<iomanip>
#include<numeric>
#include<cassert>
#include<random>
#define X first
#define Y second
#define pb push_back
#define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X))
#define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X))
#define rrep(X,Y) for (int (X) = (Y)-1;(X) >=0;--(X))
#define rreps(X,S,Y) for (int (X) = (Y)-1;(X) >= (S);--(X))
#define repe(X,Y) for ((X) = 0;(X) < (Y);++(X))
#define peat(X,Y) for (;(X) < (Y);++(X))
#define all(X) (X).begin(),(X).end()
#define rall(X) (X).rbegin(),(X).rend()
#define eb emplace_back
#define UNIQUE(X) (X).erase(unique(all(X)),(X).end())
#define Endl endl
#define NL <<"\n"

using namespace std;
using ll=long long;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
template<class T> using vv=vector<vector<T>>;
template<class T> inline bool MX(T &l,const T &r){return l<r?l=r,1:0;}
template<class T> inline bool MN(T &l,const T &r){return l>r?l=r,1:0;}
//#undef NUIP
#ifdef NUIP
#include "benri.h"
#else
#define out(args...)
#endif
#ifdef __cpp_init_captures
template<typename T>vector<T> table(int n, T v){ return vector<T>(n, v);}
template <class... Args> auto table(int n, Args... args){auto val = table(args...); return vector<decltype(val)>(n, move(val));}
#endif
const ll MOD=1e9+7; //998244353

ll dbl[33][112345]; 

int main(){
  ios_base::sync_with_stdio(false); cin.tie(0);
  cout<<fixed<<setprecision(0);
	int n,t;
	cin>>n>>t;
	vector<int> p(n);
	rep(i,n) cin>>p[i];
	rep(i,n) dbl[0][i]=p[i];
	rep(d,31)rep(i,n){
		int cur=(i+dbl[d][i])%n;
		dbl[d+1][i]=dbl[d][i]+dbl[d][cur];
	}
	vector<ll> re(n);
	rep(i,n){
		re[i]=i;
		rep(d,31)if(t>>d&1){
			re[i]+=dbl[d][re[i]%n];
		}
	}
	for(auto x:re) cout<<x+1 NL;
  return 0;
}
0