(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

제출 #401626

#제출 시각아이디문제언어결과실행 시간메모리
401626jenkinsserVepar (COCI21_vepar)C++17
70 / 70
459 ms86976 KiB
#include <bits/stdc++.h> #define FOR(ii,aa,bb) for(int ii=aa;ii<bb;ii++) #define for0(ii,bb) FOR(ii,0,bb) #define for1(ii,bb) FOR(ii,1,bb+1) #define pb push_back #define ppb pop_back #define mp make_pair #define st first #define nd second #define pii pair<int,int> #define piii pair<int,pii> #define piiii pair<pii,pii> #define pdi pair<double,int> #define vi vector<int> #define sp " " #define nl "\n" #define all(x) x.begin(),x.end() #define fastio() ios_base::sync_with_stdio(0);cin.tie(0); #define ll long long #define int ll using namespace std; const int N = 1e7+5; const int INF = 1e9+5; const int mod = 1e9+7; int a,b,c,d; vi prime(N,1); vi primes; int calc(int x,int y){ if(x==0) return 0; return x/y+calc(x/y,y); } void solve(){ cin >> a >> b >> c >> d; a--,c--; for(int i:primes){ if(calc(b,i)-calc(a,i)>calc(d,i)-calc(c,i)){ cout << "NE\n"; return; } } cout << "DA\n"; } signed main(){ fastio() for(int i=2;i<N;i++){ if(prime[i]){ primes.pb(i); for(int j=i*i;j<N;j+=i) prime[j]=0; } } int tt=1; cin >> tt; while(tt--) solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...