結果
| 問題 |
No.1020 Reverse
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-10 21:28:52 |
| 言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 261 bytes |
| コンパイル時間 | 772 ms |
| コンパイル使用メモリ | 128,148 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2024-11-30 17:26:42 |
| 合計ジャッジ時間 | 20,133 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 TLE * 6 |
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main() {
int n,k;
string s;
cin >> n >> k >> s;
for (int i=0; i+k-1<n; i++) {
reverse(s.begin()+i, s.begin()+i+k);
}
cout << s << endl;
}