結果
| 問題 |
No.3274 Arithmetic Right Shift
|
| コンテスト | |
| ユーザー |
forest3
|
| 提出日時 | 2025-09-23 17:43:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 50 ms / 1,500 ms |
| コード長 | 412 bytes |
| コンパイル時間 | 1,532 ms |
| コンパイル使用メモリ | 166,844 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-09-23 17:43:35 |
| 合計ジャッジ時間 | 2,885 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = a; i < b; i++)
using ll = long long;
int main(){
int t;
cin >> t;
rep(ti, 0, t) {
int k;
string s;
cin >> k >> s;
int sz = s.size();
deque<char> q;
rep(i, 0, sz) q.push_back(s[i]);
k = min(k, sz);
rep(i, 0, k) {
q.push_front(q.front());
q.pop_back();
}
rep(i, 0, sz) cout << q[i];
cout << endl;
}
}
forest3