結果
| 問題 |
No.1020 Reverse
|
| コンテスト | |
| ユーザー |
chacoder1
|
| 提出日時 | 2021-01-09 15:21:41 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 244 bytes |
| コンパイル時間 | 1,804 ms |
| コンパイル使用メモリ | 194,024 KB |
| 最終ジャッジ日時 | 2025-01-17 15:41:43 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 TLE * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,k;
string s;
cin>>n>>k;
cin>>s;
string t="";
for(int i=0;i<=n-k;i++){
t=s.substr(i,k);
reverse(t.begin(),t.end());
s.replace(i,k,t);
}
cout<<s<<endl;
}
chacoder1