結果
問題 | No.1020 Reverse |
ユーザー |
|
提出日時 | 2022-07-11 11:08:46 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,296 bytes |
コンパイル時間 | 1,960 ms |
コンパイル使用メモリ | 193,792 KB |
最終ジャッジ日時 | 2025-01-30 06:22:48 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 8 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll = int;using vll = vector<ll>;using vvll = vector<vll>;using vvvll = vector<vvll>;using vvvvll = vector<vvvll>;using vb = vector<bool>;using vvb = vector<vb>;using vvvb = vector<vvb>;using vvvvb = vector<vvvb>;using vd = vector<double>;using vvd = vector<vd>;using vvvd = vector<vvd>;#define all(A) A.begin(),A.end()#define ALL(A) A.begin(),A.end()#define rep(i, n) for (ll i = 0; i < (ll) (n); i++)using pqr = priority_queue<pair<ll, ll>, vector<pair<ll, ll>>, greater<pair<ll, ll>>>;template<class T>bool chmax(T& p, T q, bool C = 1) {if (C == 0 && p == q) {return 1;}if (p < q) {p = q;return 1;}else {return 0;}}template<class T>bool chmin(T& p, T q, bool C = 1) {if (C == 0 && p == q) {return 1;}if (p > q) {p = q;return 1;}else {return 0;}}ll gcd(ll(a), ll(b)) {if (b == 0)return a;ll c = a;while (a % b != 0) {c = a % b;a = b;b = c;}return b;}int main() {cin.tie(nullptr);ios::sync_with_stdio(false);ll N,K;cin>>N>>K;string S;cin>>S;cout<<S.substr(K-1,N-K+1)<<S.substr(0,K-1)<<endl;}