結果

問題 No.1469 programing
ユーザー subarusubaru
提出日時 2021-04-09 22:03:49
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 106 ms / 3,000 ms
コード長 1,884 bytes
コンパイル時間 2,090 ms
コンパイル使用メモリ 197,260 KB
実行使用メモリ 16,556 KB
最終ジャッジ日時 2023-09-07 11:20:55
合計ジャッジ時間 3,357 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 1 ms
4,384 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 4 ms
4,380 KB
testcase_09 AC 5 ms
4,380 KB
testcase_10 AC 5 ms
4,380 KB
testcase_11 AC 7 ms
4,380 KB
testcase_12 AC 6 ms
4,380 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 8 ms
4,384 KB
testcase_15 AC 8 ms
4,380 KB
testcase_16 AC 13 ms
4,384 KB
testcase_17 AC 106 ms
16,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

using VI = vector<int>;
using VL = vector<ll>;
using VVI = vector<VI>;
using VVL = vector<VL>;
using VS = vector<string>;
using VC = vector<char>;
using Q = queue<int>;
using P = pair<int, int>;
using llP = pair<ll, ll>;

#define sz(x) ((int)(x).size())
#define in(x) int x;cin>>x
#define inn(x, y) int x,y;cin>>x>>y
#define innn(x, y, z) int x,y,z;cin>>x>>y>>z
#define bit(n) (1<<(n))

void _print(ostream&){}
template<class T,class...U>
void _print(ostream&s,const T&t,const U&...u){s<<t<<(sizeof...(u)?' ':'\n');_print(s,u...);}
template<class...T>
void out(const T&...t){_print(cout,t...);}
template<class...T>
void err(const T&...t){_print(cerr,t...);}
#define strictout(x, precision) cout<<fixed<<setprecision(precision)<<(x)<<endl

#define rep(i,n) for (int i=0;i<(n);i++)
#define repp(i,n) for (int i=1;i<=(n);i++)
#define repa(j, i, n) for (int j=i; j<n; j++)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define F first
#define S second
template<class T, class U>bool chmax(T&a,const U&b){bool x=a<b;x?a=b:b;return x;}template<class T, class U>bool chmin(T&a,const U&b){bool x=a>b;x?a=b:b;return x;}
template<class T, class U>auto max(const T&a,const U&b){return a<b?b:a;}template<class T, class U>auto min(const T&a,const U&b){return a<b?a:b;}

#define max5 100010
#define max9 1000000010
#define max10 10000000010

#define YesNo(x) cout<<(x?"Yes":"No")<<endl
#define YESNO(x) cout<<(x?"YES":"NO")<<endl
#define yesno(x) cout<<(x?"yes":"no")<<endl
#define yay(x) cout<<(x?"yay":":(")<<endl

#define deg(_rad) (((_rad)/2/M_PI)*360)
#define rad(_deg) (((_deg)/360)*2*M_PI)
#define mid(min, max) ((min + max) / 2)

int main() {
  string s, ans;
  cin >> s;

  rep(i, s.length()) {
    if (ans[ans.length() - 1] != s[i]) ans.push_back(s[i]);
  }

  out(ans);

  return 0;
}
0