結果
問題 |
No.1469 programing
|
ユーザー |
![]() |
提出日時 | 2021-04-09 21:21:49 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 37 ms / 3,000 ms |
コード長 | 833 bytes |
コンパイル時間 | 828 ms |
コンパイル使用メモリ | 89,728 KB |
最終ジャッジ日時 | 2025-01-20 13:23:19 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 |
ソースコード
#include <iostream> #include <algorithm> #include <iomanip> #include <vector> #include <queue> #include <set> #include <map> #include <cassert> #define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x << "=" << x << endl; #define debug(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << x << endl; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } using namespace std; typedef long long ll; int main(){ ios::sync_with_stdio(false); cin.tie(0); cout << setprecision(10) << fixed; string s; cin >> s; int n = s.size(); cout << s[0]; for(int i = 1; i <= n-1; i++){ if(s[i] != s[i-1]) cout << s[i]; } cout << endl; }