题解
2025-08-18 15:21:31
发布于:江苏
2阅读
0回复
0点赞
#include<iostream>
#include<string>
#include<cmath>
using namespace std;
int main(){
int n;
cin>>n;
while(n--){
string s;
char c='0';
cin>>s;
for(int i=0;i<s.size();i++){
c=max(c,s[i]);
}
if(c<='1'){
cout<<"1 1 1 1\n";
}else if(c<'8'){
cout<<"0 1 1 1\n";
}else if(c<='9'){
cout<<"0 0 1 1\n";
}else if(c<='F'){
cout<<"0 0 0 1\n";
}else{
cout<<"0 0 0 0\n";
}
}
return 0;
}
这里空空如也
有帮助,赞一个