(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.

Submission #991668

#TimeUsernameProblemLanguageResultExecution timeMemory
991668gutzzyVepar (COCI21_vepar)C++17
30 / 70
4 ms1368 KiB
#include <bits/stdc++.h> #define int long long using namespace std; int count(int n, int p){ int c = 0; while(n>0){ n /= p; c += n; } return c; } int32_t main(){ int t,a,b,c,d; int maxn = 100000; cin >> t; vector<int> prime(maxn,true); prime[0] = false; prime[1] = false; for(int i=2;i<maxn;i++){ if(prime[i]){ for(int j=i*i;j<=maxn;j+=i){ prime[j] = false; } } } while(t--){ cin >> a >> b >> c >> d; bool ans = true; for(int i=2;i<maxn;i++){ if(!prime[i]) continue; int pr = i; if(count(b,pr)-count(a-1,pr)>count(d,pr)-count(c-1,pr)){ ans = false; break; } } if(ans) cout << "DA" << endl; else cout << "NE" << endl; } return 0; }
#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...