結果
| 問題 | No.1307 Rotate and Accumulate |
| コンテスト | |
| ユーザー |
penguinman
|
| 提出日時 | 2020-12-04 01:54:04 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 544 bytes |
| 記録 | |
| コンパイル時間 | 1,605 ms |
| コンパイル使用メモリ | 209,800 KB |
| 実行使用メモリ | 9,984 KB |
| 最終ジャッジ日時 | 2026-06-15 15:39:52 |
| 合計ジャッジ時間 | 16,974 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 TLE * 2 -- * 11 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
int N,Q,r,x,i;
short A[100000];
int B[100000];
int main(){
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
cin>>N>>Q;
for(i=0;i<N;i++) cin>>A[i];
while(Q--){
cin>>r;
x=r;
for(i=0;i<N;i++){
B[i]+=A[r];
r++;
if(r==N) r=0;
}
}
cout<<B[0];
for(i=1;i<N;i++) cout<<" "<<B[i];
}
penguinman