QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#559458 | #8829. Aibohphobia | AChievedreaM# | WA | 0ms | 3604kb | C++17 | 922b | 2024-09-11 22:09:39 | 2024-09-11 22:09:40 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main()
{
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
ll t,n;
t=1;
cin>>t;
while(t--)
{
string s;
cin>>s;
ll n=s.size();
map<char,ll>mp;
for(ll i=0;i<n;i++)
{
mp[s[i]]++;
}
ll m=mp.size();
char c='#';
ll d=0;
for(auto q:mp)
{
if(q.second==1)
c=q.first;
else d++;
}
if(c!='#')
{
cout<<"YEq\n";
cout<<c;
for(auto q:mp)
{
if(q.first!=c)
{
for(ll i=1;i<=q.second;i++)
cout<<q.first;
}
}
cout<<'\n';
}
else
{
if(d==2||d==1)
cout<<"NO\n";
else
{
cout<<"YEq\n";
while(1)
{
ll f=0;
for(auto q:mp)
{
if(q.second>0)
{
cout<<q.first;
mp[q.first]--;
f=1;
}
}
if(f==0)break;
}
cout<<'\n';
}
}
}
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3604kb
input:
5 a sos abba icpc tenet
output:
YEq a YEq oss NO YEq pcci YEq neett
result:
wrong answer Token parameter [name=yes/no] equals to "YEq", doesn't correspond to pattern "[yY][eE][sS]|[nN][oO]" (test case 1)