結果
| 問題 |
No.1307 Rotate and Accumulate
|
| コンテスト | |
| ユーザー |
penguinman
|
| 提出日時 | 2020-12-04 01:34:17 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 543 bytes |
| コンパイル時間 | 2,104 ms |
| コンパイル使用メモリ | 193,344 KB |
| 最終ジャッジ日時 | 2025-01-16 15:25:01 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 11 TLE * 8 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
unsigned char A[100000];
int B[100000];
int main(){
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
std::cout.tie(nullptr);
int N,Q; cin>>N>>Q;
for(int i=0;i<N;i++) cin>>A[i];
int r;
while(Q--){
cin>>r;
for(int i=0;i<N;i++,r++){
if(r==N) r=0;
B[i]+=A[r];
}
}
cout<<B[0];
for(int i=1;i<N;i++) cout<<" "<<B[i];
}
penguinman