1804_ykm's blog

By 1804_ykm, history, 17 months ago, In English

The first Test point WA, help!!!

Attached question address:1367A

#include<bits/stdc++.h>
using namespace std;
int n,flag;
string s;
int main(){
	cin>>n;
	while(n--){
		cin>>s;
		for(int i=0;i<s.size();i++){
			if(s[i]!=s[i-1]&&flag>0){
				cout<<s[i];
				flag=0;
			}
			else{
				flag++;
			}	
		}
		cout<<endl;
	}
	return 0;
}

Full text and comments »

  • Vote: I like it
  • -10
  • Vote: I do not like it

By 1804_ykm, history, 17 months ago, In English

【Personal】 information`

name: Yang Kaiming

age: 11

coordinates: Changsha, Hunan, China

commonly used OJ: Luogu, Codeforces

Full text and comments »

  • Vote: I like it
  • -16
  • Vote: I do not like it