結果
問題 |
No.292 芸名
|
ユーザー |
|
提出日時 | 2015-10-23 22:38:28 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,001 bytes |
コンパイル時間 | 1,227 ms |
コンパイル使用メモリ | 160,380 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-23 01:28:14 |
合計ジャッジ時間 | 2,358 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 WA * 1 RE * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define ALL(x) (x).begin(),(x).end() #define ABS(x) ((x < 0) ? -(x) : (x)) #define EXIST(s,e) ((s).find(e)!=(s).end()) #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define MP make_pair #define PB push_back #define REP(i,n) FOR(i,0,n) #define SORT(c) sort((c).begin(),(c).end()) #define SIZE(x) int((x).size()) typedef long double ld; typedef long long ll; typedef unsigned long long ull; typedef unsigned int uint; typedef vector<int> VI; typedef vector<VI> VVI; const double INF = 1e100; const double EPS = 1e-10; const double PI = acos(-1.0); const int mod = 1000000007; const int dx[4] = {1, 0, -1, 0}; const int dy[4] = {0, 1, 0, -1}; int main(void) { string s; int t, u; cin >> s; cin >> t >> u; if (t == u) { s.erase(s.begin() + t); } else if (ABS(t-u) == 1) { s.erase(s.begin() + t); s.erase(s.begin() + u); } else { s.erase(s.begin() + t); s.erase(s.begin() + u-1); } cout << s << endl; return 0; }