Task: | Just Solve It |
Sender: | Varokaa J:tä |
Submission time: | 2019-05-25 11:06:37 +0300 |
Language: | C++ |
Status: | READY |
Result: | ACCEPTED |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.02 s | details |
#2 | ACCEPTED | 0.02 s | details |
#3 | ACCEPTED | 0.03 s | details |
#4 | ACCEPTED | 0.01 s | details |
#5 | ACCEPTED | 0.02 s | details |
#6 | ACCEPTED | 0.03 s | details |
#7 | ACCEPTED | 0.02 s | details |
#8 | ACCEPTED | 0.01 s | details |
Code
#include <iostream> using namespace std; typedef long long ll; ll n, k; void no() { cout << "NO\n"; exit(0); } void yes() { cout << "YES\n"; exit(0); } int main() { cin >> n >> k; if (k == 1) no(); if (n%2 == 0) { if (k >= 2) yes(); else no(); } else { if (k >= 3) yes(); else no(); } return 0; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
3 1 |
correct output |
---|
NO |
user output |
---|
NO |
Test 2
Verdict: ACCEPTED
input |
---|
3 2 |
correct output |
---|
NO |
user output |
---|
NO |
Test 3
Verdict: ACCEPTED
input |
---|
3 3 |
correct output |
---|
YES |
user output |
---|
YES |
Test 4
Verdict: ACCEPTED
input |
---|
4 1 |
correct output |
---|
NO |
user output |
---|
NO |
Test 5
Verdict: ACCEPTED
input |
---|
4 2 |
correct output |
---|
YES |
user output |
---|
YES |
Test 6
Verdict: ACCEPTED
input |
---|
4 3 |
correct output |
---|
YES |
user output |
---|
YES |
Test 7
Verdict: ACCEPTED
input |
---|
123456 654321 |
correct output |
---|
YES |
user output |
---|
YES |
Test 8
Verdict: ACCEPTED
input |
---|
1000000000 1000000000 |
correct output |
---|
YES |
user output |
---|
YES |