UKE求助

P5730 【深基5.例10】显示屏

LE020I2 @ 2023-07-08 20:54:41

为什么五个测试点全部UKE

样例已过

#1 按理来说会过,但UKE

#include<iostream>
using namespace std;

int x;
string n;

string f(char n,int a){
    if(n=='0'){
        if(a==1||a==5){
            return "XXX";
        }else{
            return "X.X";
        }
    }else if(n=='1'){
        return "..X";
    }else if(n=='2'){
        if(a%2!=0){
            return "XXX";
        }else if(a==2){
            return "..X";
        }else{
            return "X..";
        }
    }else if(n=='3'){
        if(a%2!=0){
            return "XXX";
        }else{
            return "..X";
        }
    }else if(n=='4'){
        if(a<3){
            return "X.X";
        }else if(a==3){
            return "XXX";
        }else{
            return "..X";
        }
    }else if(n=='5'){
        if(a%2!=0){
            return "XXX";
        }else if(a==2){
            return "X..";
        }else{
            return "..X";
        }
    }else if(n=='6'){
        if(a%2!=0){
            return "XXX";
        }else if(a==2){
            return "X..";
        }else{
            return "X.X";
        }
    }else if(n=='7'){
        if(a==1){
            return "XXX";
        }else{
            return "..X";
        }
    }else if(n=='8'){
        if(a%2!=0){
            return "XXX";
        }else{
            return "X.X";
        }
    }else{
        if(a%2!=0){
            return "XXX";
        }else if(a==2){
            return "X.X";
        }else{
            return "..X";
        }
    }
}

int main(){
    cin>>x>>n;
    for(int i=1;i<=5;i++){
        for(int j=0;j<n.size();j++){
            cout<<f(n[j],i);
            if(j!=n.size()-1){
                cout<<'.';
            }
        }
        cout<<endl;
    }
    return 0;
}

by Crab_Tang @ 2023-07-08 21:07:47

洛谷炸了


by C20220215 @ 2023-07-08 21:08:02

疑似评测机故障


by Crab_Tang @ 2023-07-08 21:13:11

@C20220215 同意


by LE020I2 @ 2023-07-08 21:44:23

@Robots75 @C20220215

此代码已AC


|