Submission #46996243
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(ll i=0;i<n;++i)
#define rrep(i,n) for(ll i=n-1;i>=0;--i)
#define FOR(i,s,e) for(ll i=s;i<=e;++i)
#define FFOR(i,s,e) for(ll i=s;i>=e;--i)
#define yesno(flg) if(flg){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define ALL(a) (a).begin(),(a).end()
#define mp make_pair
#define pb push_back
#define vl vector<ll>
#define vs vector<string>
#define so(a) sort(a.begin(),a.end())
#define fi first
#define se second
#define print(a) cout<<a<<endl
#define ssize(a) (ll)(a.size())
#define MAX_N 1002
#define i197 1000000007
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
typedef pair<int,int> Pi;
typedef pair<ll, ll> P2;
typedef pair<P2,ll> P3;
typedef pair<P2,P2> P4;
const ll INF=1000000000000000001;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
ll x,y;
cin>>x>>y;
string ans="No";
if(2>=y-x && 0<= y-x)ans="Yes";
if(3>=x-y && 0<=x-y)ans="Yes";
print(ans);
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - 2UP3DOWN |
| User | akarinkof |
| Language | C++ 20 (gcc 12.2) |
| Score | 100 |
| Code Size | 1187 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3604 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| 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 | 3448 KiB |
| random_01.txt | AC | 1 ms | 3328 KiB |
| random_02.txt | AC | 1 ms | 3472 KiB |
| random_03.txt | AC | 1 ms | 3432 KiB |
| random_04.txt | AC | 1 ms | 3468 KiB |
| random_05.txt | AC | 1 ms | 3512 KiB |
| random_06.txt | AC | 1 ms | 3416 KiB |
| random_07.txt | AC | 1 ms | 3408 KiB |
| random_08.txt | AC | 1 ms | 3464 KiB |
| random_09.txt | AC | 1 ms | 3604 KiB |
| random_10.txt | AC | 1 ms | 3416 KiB |
| random_11.txt | AC | 1 ms | 3376 KiB |
| sample_01.txt | AC | 1 ms | 3340 KiB |
| sample_02.txt | AC | 1 ms | 3384 KiB |
| sample_03.txt | AC | 1 ms | 3464 KiB |