(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 #991664

#TimeUsernameProblemLanguageResultExecution timeMemory
991664gutzzyVepar (COCI21_vepar)C++14
0 / 70
1583 ms6328 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; cin >> t; vector<int> prime; for(int i=2;i<10000000;i++){ bool p = true; for(int j=2;j*j<=i;j++){ if(i%j==0){ p = false; break; } } if(p) prime.push_back(i); } while(t--){ cin >> a >> b >> c >> d; bool ans = true; for(auto pr:prime){ 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...