1 solutions

  • 0
    @ 2026-5-27 19:19:32
    #include<bits/stdc++.h>
    using namespace std;
    
    int main()
    {
        int t;
        cin>>t;
        while(t--)
        {
            string s;
            cin>>s;
            char maxv='0';
            for(int i=0;i<s.size();i++)
            {
                maxv=max(maxv,s[i]);
            }
            cout<<(maxv<='1')<<" "<<(maxv<='7')<<" "<<(maxv<='9')<<" "<<(maxv<='F')<<endl;
        }
        return 0;
    }
    

    Information

    ID
    1167
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    # Submissions
    29
    Accepted
    10
    Uploaded By