結果
問題 |
No.1020 Reverse
|
ユーザー |
![]() |
提出日時 | 2020-07-01 14:53:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 309 bytes |
コンパイル時間 | 1,677 ms |
コンパイル使用メモリ | 167,108 KB |
実行使用メモリ | 13,884 KB |
最終ジャッジ日時 | 2024-09-14 00:19:15 |
合計ジャッジ時間 | 11,643 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 TLE * 3 -- * 6 |
ソースコード
#include <bits/stdc++.h> using namespace std; char c[200001]; int main() { int n, k; scanf("%d%d",&n,&k); scanf("%s", c); string s{ c }; for (int i = 0; i < n - k + 1; ++i) { reverse(s.begin() + i, s.begin() + k + i); } printf("%s\n", s.c_str()); return 0; }