Submission #47000019
Source Code Expand
Copy
#include<bits/stdc++.h>using namespace std;#define int long longsigned main(){int x,y;cin>>x>>y;int sub=y-x;if(sub>=0&&sub<=2||sub<=0&&sub>=-3){cout<<"Yes";}else{cout<<"No";}}
#include<bits/stdc++.h> using namespace std; #define int long long signed main(){ int x,y;cin>>x>>y; int sub=y-x; if(sub>=0&&sub<=2||sub<=0&&sub>=-3){ cout<<"Yes"; }else{ cout<<"No"; } }
Submission Info
Submission Time | |
---|---|
Task | A - 2UP3DOWN |
User | chronicle12345 |
Language | C++ 20 (gcc 12.2) |
Score | 100 |
Code Size | 235 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 3512 KB |
Compile Error
Main.cpp: In function ‘int main()’: Main.cpp:8:14: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] 8 | if(sub>=0&&sub<=2||sub<=0&&sub>=-3){ | ~~~~~~^~~~~~~~
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 | 3464 KB |
random_01.txt | AC | 1 ms | 3496 KB |
random_02.txt | AC | 1 ms | 3452 KB |
random_03.txt | AC | 1 ms | 3456 KB |
random_04.txt | AC | 1 ms | 3368 KB |
random_05.txt | AC | 1 ms | 3492 KB |
random_06.txt | AC | 1 ms | 3456 KB |
random_07.txt | AC | 1 ms | 3508 KB |
random_08.txt | AC | 1 ms | 3444 KB |
random_09.txt | AC | 1 ms | 3452 KB |
random_10.txt | AC | 1 ms | 3512 KB |
random_11.txt | AC | 1 ms | 3436 KB |
sample_01.txt | AC | 1 ms | 3512 KB |
sample_02.txt | AC | 1 ms | 3508 KB |
sample_03.txt | AC | 1 ms | 3488 KB |