結果
| 問題 | No.1307 Rotate and Accumulate |
| コンテスト | |
| ユーザー |
penguinman
|
| 提出日時 | 2020-12-04 01:36:36 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 535 bytes |
| 記録 | |
| コンパイル時間 | 2,667 ms |
| コンパイル使用メモリ | 196,004 KB |
| 最終ジャッジ日時 | 2025-01-16 15:26:29 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 TLE * 13 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
int main(){
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
int N,Q; cin>>N>>Q;
vector<int> A(N),B(N);
for(int i=0;i<N;i++) cin>>A[i];
int r;
while(Q--){
cin>>r;
for(int i=0;i<N;i++){
B[i]+=A[r];
r++;
r%=N;
}
}
cout<<B[0];
for(int i=1;i<N;i++) cout<<" "<<B[i];
}
penguinman