結果

問題 No.1020 Reverse
ユーザー uw_yu1rabbit
提出日時 2020-04-16 14:35:37
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 266 bytes
コンパイル時間 2,317 ms
コンパイル使用メモリ 193,296 KB
最終ジャッジ日時 2025-01-09 19:26:59
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 8 TLE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    int n,k;
    string s;
    cin >> n >> k >> s;
    for(int i = 0; i < n - k + 1; i++){
        for(int j = i; j < i + k; j++){
            swap(s[j],s[i + k - j]);
        }
    }
    cout << s << endl;
}
0