結果
問題 |
No.292 芸名
|
ユーザー |
|
提出日時 | 2019-09-03 16:37:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 517 bytes |
コンパイル時間 | 1,430 ms |
コンパイル使用メモリ | 165,672 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 05:56:01 |
合計ジャッジ時間 | 2,083 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
/** @file 292.cpp @title No.292 芸名 - yukicoder @url https://yukicoder.me/problems/no/292 **/ #include <bits/stdc++.h> using namespace std; typedef long long LL; #define ALL(obj) (obj).begin(), (obj).end() #define REP(i, N) for (int i = 0; i < (N); ++i) int main() { string S; int t, u; cin >> S >> t >> u; if (t == u) { S.erase(t, 1); } else if (t < u) { S.erase(t, 1); S.erase(u - 1, 1); } else { S.erase(u, 1); S.erase(t-1, 1); } cout << S << endl; return 0; }