/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 2ms 324.0 KiB

Code

#include<bits/stdc++.h>
using namespace std;
const long long M=1e6+10,MOD=1000000007;
typedef long long ll;

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int t=1;
    cin>>t;
    while(t--){
        string s;
        cin>>s;
        map<char,int>mp;
        for(char i:s)mp[i]++;
        int ok=0;
        for(char ch='a';ch<='z';ch++){
            if(mp[ch]>0){
            ok++;
            break;
        }
    }
        for(char ch='A';ch<='Z';ch++){
            if(mp[ch]>0){
                ok++;
                break;
            }
        }
        for(char i='0';i<='9';i++){
          //  cout<<i<<endl;
            if(mp[i]>0){
                ok++;
                break;
            }
        }
       // cout<<ok<<endl;
        string a="[!@#$%^&*()]";
        //cout<<a<<endl;
        for(char i:a){
           // cout<<i<<" ";
            if(mp[i]>0){
                ok++;
              //  break;
            }
        }
       // cout<<ok<<endl;
        ok+=((int)s.size()>7);
        cout<<(ok>=5?"valid\n":"invalid\n");

       }

    
    return 0;
 
}

Information

Submit By
Type
Submission
Problem
P1007 Password Checker
Contest
Beta Round #1
Language
C++17 (G++ 13.2.0)
Submit At
2023-11-29 16:19:02
Judged At
2024-11-11 03:51:09
Judged By
Score
0
Total Time
2ms
Peak Memory
324.0 KiB