結果
問題 | No.292 芸名 |
ユーザー |
![]() |
提出日時 | 2017-11-17 02:16:57 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 726 bytes |
コンパイル時間 | 764 ms |
コンパイル使用メモリ | 76,220 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-25 07:07:45 |
合計ジャッジ時間 | 1,641 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
#include<iostream>#include<iomanip>#include<cmath>#include<string>#include<algorithm>#include<vector>#include<math.h>#include<stack>using namespace std;int main(void){string S; int t, u; cin >> S >> t >> u;string head, center, tail;if(u > t){head = S.substr(0, t);center = S.substr(t+1, u - t -1);tail = S.substr(u + 1, S.size() - u);cout << head + center + tail << endl;}else if(u < t){head = S.substr(0, u);center = S.substr(u+1, t-u-1);tail = S.substr(t+1, S.size()-t);cout << head + center + tail << endl;}else{head = S.substr(0, t);tail = S.substr(u+1, S.size()-1);cout << head + tail << endl;}return 0;}