結果
問題 | No.1020 Reverse |
ユーザー |
![]() |
提出日時 | 2020-02-27 18:18:01 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 274 bytes |
コンパイル時間 | 655 ms |
コンパイル使用メモリ | 67,836 KB |
実行使用メモリ | 13,640 KB |
最終ジャッジ日時 | 2024-10-13 15:59:41 |
合計ジャッジ時間 | 6,203 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 4 TLE * 2 -- * 9 |
ソースコード
#include <iostream>#include <string>#include <algorithm>using namespace std;int main(){int n, k;cin>>n>>k;string s;cin>>s;int l=k/2;for(int i=0; i<n-k+1; i++){for(int j=0; j<l; j++){swap(s[i+j], s[i+k-1-j]);}}cout<<s<<endl;return 0;}