QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#418476#6691. OrderschenxiiWA 0ms3588kbC++14962b2024-05-23 14:09:462024-05-23 14:09:46

Judging History

你现在查看的是最新测评结果

  • [2024-05-23 14:09:46]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3588kb
  • [2024-05-23 14:09:46]
  • 提交

answer

#include<bits/stdc++.h>
#define ll long long
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
const int N=1e5+10;


int exited(int x){
    if(x==0) return 0;
    else return 1;
}

void solve(){ 
int cnt=0;
int a,b;cin>>a>>b;
int red[3]={0,1,4};
int black[5]={0,2,3,5,6};


for(int i=0;i<=2;i++){
    for(int j=0;j<=2;j++){
        for(int k=0;k<=2;k++){
            for(int ii=0;ii<=4;ii++){
                for(int jj=0;jj<=4;jj++){
                    for(int kk=0;kk<=4;kk++){


            if(red[i]+red[j]+red[k]==a&&black[ii]+black[jj]+black[kk]==b)
            cnt=exited(red[i])+exited(red[j])+exited(red[k])+exited(black[ii])+exited(black[jj])+exited(black[kk]);
            if(cnt==3){cout<<"YES"<<endl;return;}cnt=0;
        }}}
    }
}}



cout<<"NO"<<endl;


}




int main(void){
    IOS
    int t=1;
    //cin>>t;
    while(t--){
        solve();
    }
}


Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3588kb

input:

2
4 5
6 12
1 3
6 15
8 1
3 100
3 200
4 300
6 100

output:

NO

result:

wrong answer expected YES, found NO [1st token]