結果

問題 No.1020 Reverse
ユーザー hatsuka_iwahatsuka_iwa
提出日時 2021-02-03 21:09:35
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 215 bytes
コンパイル時間 1,770 ms
コンパイル使用メモリ 165,488 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-09-12 16:50:53
合計ジャッジ時間 11,858 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
7,940 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1,117 ms
4,380 KB
testcase_08 TLE -
testcase_09 AC 119 ms
4,376 KB
testcase_10 TLE -
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N, K;
  string S;
  cin >> N >> K >> S;

  for (int i = 0; i < N - K + 1; i++)
    reverse(S.begin() + i, S.begin() + i + K);

  cout << S << endl;
}
0