Submission #39181547
Source Code Expand
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b, c, d; cin >> n >> a >> b >> c >> d; if (b == 0 && c == 0) { if (a == n - 1 || d == n - 1) { cout << "Yes" << '\n'; exit(0); } } else { if (abs(b - c) <= 1) { cout << "Yes" << '\n'; exit(0); } } cout << "No" << '\n'; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - XXYYX |
User | swiftc |
Language | C++ (GCC 9.2.1) |
Score | 300 |
Code Size | 371 Byte |
Status | AC |
Exec Time | 5 ms |
Memory | 3564 KiB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00-sample-001.txt, 00-sample-002.txt, 00-sample-003.txt |
All | 00-sample-001.txt, 00-sample-002.txt, 00-sample-003.txt, 01-001.txt, 01-002.txt, 01-003.txt, 01-004.txt, 01-005.txt, 01-006.txt, 01-007.txt, 01-008.txt, 01-009.txt, 01-010.txt, 01-011.txt, 01-012.txt, 01-013.txt, 01-014.txt, 01-015.txt, 01-016.txt, 01-017.txt, 01-018.txt, 01-019.txt, 01-020.txt, 01-021.txt, 01-022.txt, 01-023.txt, 01-024.txt, 01-025.txt, 01-026.txt, 01-027.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00-sample-001.txt | AC | 5 ms | 3392 KiB |
00-sample-002.txt | AC | 2 ms | 3484 KiB |
00-sample-003.txt | AC | 2 ms | 3512 KiB |
01-001.txt | AC | 2 ms | 3500 KiB |
01-002.txt | AC | 3 ms | 3472 KiB |
01-003.txt | AC | 2 ms | 3560 KiB |
01-004.txt | AC | 2 ms | 3500 KiB |
01-005.txt | AC | 2 ms | 3332 KiB |
01-006.txt | AC | 2 ms | 3332 KiB |
01-007.txt | AC | 2 ms | 3564 KiB |
01-008.txt | AC | 2 ms | 3460 KiB |
01-009.txt | AC | 2 ms | 3468 KiB |
01-010.txt | AC | 3 ms | 3504 KiB |
01-011.txt | AC | 2 ms | 3468 KiB |
01-012.txt | AC | 4 ms | 3488 KiB |
01-013.txt | AC | 2 ms | 3508 KiB |
01-014.txt | AC | 2 ms | 3444 KiB |
01-015.txt | AC | 2 ms | 3564 KiB |
01-016.txt | AC | 2 ms | 3392 KiB |
01-017.txt | AC | 2 ms | 3476 KiB |
01-018.txt | AC | 2 ms | 3448 KiB |
01-019.txt | AC | 2 ms | 3484 KiB |
01-020.txt | AC | 2 ms | 3468 KiB |
01-021.txt | AC | 2 ms | 3512 KiB |
01-022.txt | AC | 2 ms | 3444 KiB |
01-023.txt | AC | 2 ms | 3464 KiB |
01-024.txt | AC | 2 ms | 3560 KiB |
01-025.txt | AC | 2 ms | 3480 KiB |
01-026.txt | AC | 2 ms | 3472 KiB |
01-027.txt | AC | 1 ms | 3564 KiB |