結果
問題 |
No.1020 Reverse
|
ユーザー |
![]() |
提出日時 | 2020-04-10 21:39:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 585 bytes |
コンパイル時間 | 909 ms |
コンパイル使用メモリ | 83,236 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-09-15 19:37:11 |
合計ジャッジ時間 | 6,151 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 TLE * 1 -- * 9 |
ソースコード
#include <stdio.h> #include <math.h> #include <iostream> #include <algorithm> #include <vector> #include <numeric> #include <string> #include <map> #include <stack> using namespace std; typedef long long int lli; #define urept(soeji, start, n) for (int soeji = start; soeji < n; soeji++) #define drept(soeji, start, n) for (int soeji = start; soeji > n; soeji--) int main(void) { int N, K; cin >> N >> K; string s; cin >> s; for (int i = 0; i < N - K + 1; i++) { reverse(s.begin() + i, s.begin() + (i + K)); } cout << s << endl; return 0; }