結果
| 問題 |
No.1469 programing
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-09 21:22:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 118 ms / 3,000 ms |
| コード長 | 276 bytes |
| コンパイル時間 | 1,698 ms |
| コンパイル使用メモリ | 166,536 KB |
| 実行使用メモリ | 14,416 KB |
| 最終ジャッジ日時 | 2024-06-25 03:56:37 |
| 合計ジャッジ時間 | 2,770 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
string S;cin>>S;
int N=S.size();
string T="";
for(int i=0;i<N-1;i++){
if(S[i]==S[i+1]){
i++;
}
T+=S[i];
}
if(S[N-1]!=S[N-2]){
T+=S[N-1];
}
cout<<T<<endl;
}