結果
| 問題 |
No.1469 programing
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-29 18:11:57 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 104 ms / 3,000 ms |
| コード長 | 349 bytes |
| コンパイル時間 | 1,729 ms |
| コンパイル使用メモリ | 192,772 KB |
| 最終ジャッジ日時 | 2025-02-09 21:55:22 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
#define all(a) a.begin(),a.end()
int main(){
string s;
cin >> s;
int n=s.size();
string ans;
ans.push_back(s[0]);
for(int i=1; i<n; ++i){
if(s[i-1]==s[i]) continue;
ans.push_back(s[i]);
}
cout << ans << endl;
return 0;
}