Information
- ID
- 6643
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 4
- Tags
- (None)
- # Submissions
- 40
- Accepted
- 19
- Uploaded By
#include<bits/stdc++.h>
#include<time.h>
using namespace std;
#define ioio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define endl "\n"
#define debug(x) cout<<#x<<":"<<x<<endl;
#define P pair
#define P1 first
#define P2 second
#define u_map unordered_map
#define p_queue priority_queue
typedef long long ll;
const double eps = 1e-6;
const int mod = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const int N = 1e7 + 30;
int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1};
/*-------------------------------------------------*/
int n;
int vis[N];
void slove(){
cin>>n;
if(vis[n])cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
int main(){
ioio
for(int i=0;i*2022<=1000000;i++)
for(int j=0;j*2021<=1000000;j++)
vis[i*2022+j*2021]=1;
int t=1;
cin>>t;
while(t--){
slove();
}
return 0;
}
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.