結果
| 問題 |
No.1020 Reverse
|
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-08-24 19:00:05 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 355 bytes |
| コンパイル時間 | 1,023 ms |
| コンパイル使用メモリ | 101,420 KB |
| 最終ジャッジ日時 | 2025-02-16 13:10:16 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 TLE * 1 -- * 9 |
ソースコード
#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
using namespace std;
int main()
{
int n, k, l;
string s;
cin >> n >> k >> s;
l = n-k+1;
for (int i = 0; i < l; i++){
reverse(s.begin()+i, s.begin()+i+k);
}
cout << s << endl;
}
kpinkcat