QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#618491#6696. Three DicexiaofangerWA 0ms3648kbC++17784b2024-10-06 22:47:282024-10-06 22:47:28

Judging History

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

  • [2024-10-06 22:47:28]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3648kb
  • [2024-10-06 22:47:28]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double

void solve() {
	
	int A , B; cin >> A >> B;
	
	for(int i = 1 ; i <= 6 ; i++){
		for(int j = 1 ; j <= 6 ; j++){
			for(int k = 1 ; k <= 6 ; k++){
				int h = 0 , b = 0;
				if(i == 1 || i == 4) h += i;
				if(j == 1 || j == 4) h += j;
				if(k == 1 || k == 4) h += k;
				 
				if(i != 1 && i != 4) b += i;
				if(j != 1 && j != 4) b += j;
				if(k != 1 && k != 4) b += k; 
				
				if(h == A || b == B){
					cout << "Yes\n";
					return;
				}
			}
		}
	}
	
	cout << "No\n";
	
}

int main(){
	ios::sync_with_stdio(false);
    cin.tie(0);
   	
    int __ = 1;
    //cin >> __;
    
	while(__--){
   		solve();
   	}
    return 0;
}








 

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3628kb

input:

4 5

output:

Yes

result:

ok answer is YES

Test #2:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

3 0

output:

Yes

result:

ok answer is YES

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3552kb

input:

1 2

output:

Yes

result:

wrong answer expected NO, found YES