<?php
fscanf(STDIN, "%d\n", $test);
while($test--)
{
$ooo=array();
for($i=0;$i<26;$i++)
$ooo[$i]=0;
fscanf(STDIN, "%s\n", $raa);
$qwe=0;
$p=strlen($raa);
for($i=0;$i<$p;$i++)
{
$w=ord($raa[$i]);
$qwe= $w-97;
$ooo[$qwe]=$ooo[$qwe]+1;
}
$f=0;
$c=0;
for($i=0;$i<26;$i++)
{
if($ooo[$i]%2!=0)
{
$f=1;
$c++;
}
}
if($f==0)
{
echo"Yes";
}
else if($f==1 && strlen($raa)%2==1 && $c==1)
{
echo "Yes";
}
else
{
echo "No";
}
echo "<br>";
}
Subscribe to:
Post Comments (Atom)
Uploading and Running Lambda function in AWS
Main.go package main import ( "fmt" "encoding/json" "log" "github.com/aws/aws-lambda-g...
-
http://codeforces.com/contest/476/problem/B #include < bits / stdc ++. h > using namespace std ; string s1 , s2 ; int val ...
-
http://codeforces.com/contest/476/problem/A #include < bits / stdc ++. h > using namespace std ; int dp [ 10001 ][ 5055 ];...
-
http://www.spoj.com/problems/DQUERY/en/ DQUERY -...
No comments:
Post a Comment