Submission #74014000


Source Code Expand

#include <bits/stdc++.h>
using namespace std;

int main() {
  int X,Y;
  cin >> X >> Y;
  if ((0 <= Y-X && Y-X <= 2) || (Y-X <= 0 && Y-X >= -3))cout << "Yes" << endl;
  else cout << "No" << endl;
}

Submission Info

Submission Time
Task A - 2UP3DOWN
User knr_imtr
Language C++23 (GCC 15.2.0)
Score 100
Code Size 205 Byte
Status AC
Exec Time 1 ms
Memory 3676 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 3
AC × 15
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All hand_01.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
hand_01.txt AC 1 ms 3556 KiB
random_01.txt AC 1 ms 3580 KiB
random_02.txt AC 1 ms 3580 KiB
random_03.txt AC 1 ms 3556 KiB
random_04.txt AC 1 ms 3676 KiB
random_05.txt AC 1 ms 3496 KiB
random_06.txt AC 1 ms 3500 KiB
random_07.txt AC 1 ms 3556 KiB
random_08.txt AC 1 ms 3424 KiB
random_09.txt AC 1 ms 3580 KiB
random_10.txt AC 1 ms 3548 KiB
random_11.txt AC 1 ms 3648 KiB
sample_01.txt AC 1 ms 3500 KiB
sample_02.txt AC 1 ms 3556 KiB
sample_03.txt AC 1 ms 3496 KiB