結果

問題 No.1020 Reverse
ユーザー Yug_min_null
提出日時 2021-11-11 16:27:13
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 319 bytes
コンパイル時間 2,169 ms
コンパイル使用メモリ 188,700 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-22 23:25:01
合計ジャッジ時間 2,872 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 9 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#define ll long long
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;

int main(){
  int N, K; cin >> N >> K;
  string S; cin >> S;
  string ans = "";
  for(int i = K-1; i < N; i++) ans += S[i];
  for(int i = K-2; i >~ 0; i--) ans += S[i];
  cout << ans << endl;
}
0