Submission #4084618


Source Code Expand

Copy
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define ll long long
using namespace std;
char a[105]; 
int main()
{
	cnt=1;
	scanf("%s",a);
	if(strlen(a)<2)
	{
		printf("No\n");
	}
	else
	{
		sort(a,a+strlen(a));
		for(int i=1;i<strlen(a);i+=2)
		{
			if(a[i]!=a[i-1])
			{
				printf("No\n");
				break;	
				cnt=0;
			}	
		}	
		if(cnt=1)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
	}
	return 0;
}

Submission Info

Submission Time
Task B - 美しい文字列 / Beautiful Strings
User vjudge1
Language C++14 (GCC 5.4.1)
Score 0
Code Size 465 Byte
Status

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:11:2: error: ‘cnt’ was not declared in this scope
  cnt=1;
  ^
./Main.cpp:12:15: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%s",a);
               ^