QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#684882#6696. Three DicenageingWA 0ms3784kbC++20767b2024-10-28 16:22:072024-10-28 16:22:08

Judging History

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

  • [2024-10-28 16:22:08]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3784kb
  • [2024-10-28 16:22:07]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pii;


void solve() {
	int a, b;
	cin >> a >> b;
	vector<int> A = {1, 4}, B = {2, 3, 5, 6};
	for (int i = 0; i < 2; i ++) {
		for (int j = 0; j < 4; j ++) {
			for (int k = j; k < 4; k ++) {
				if (a == A[i] && b == B[j] + B[k]) {
					cout << "Yes\n";
					return;
				}
			}
		}
	}

	for (int i = 0; i < 4; i ++) {
		for (int j = 0; j < 2; j ++) {
			for (int k = j; k < 2; k ++) {
				if (a == A[j] + A[k] && b == B[i]) {
					cout << "Yes\n";
					return;
				}
			}
		}
	}
	cout << "No\n";
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr); cout.tie(nullptr);
	int t = 1;
	//cin >> t;
	while (t --) {
		solve();
	}
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4 5

output:

Yes

result:

ok answer is YES

Test #2:

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

input:

3 0

output:

No

result:

wrong answer expected YES, found NO