結果
| 問題 |
No.1469 programing
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-09 22:03:49 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 116 ms / 3,000 ms |
| コード長 | 1,884 bytes |
| コンパイル時間 | 2,075 ms |
| コンパイル使用メモリ | 191,748 KB |
| 最終ジャッジ日時 | 2025-01-20 14:24:53 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
#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;
}