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

#TimeUsernameProblemLanguageResultExecution timeMemory
808524tlnk07Vepar (COCI21_vepar)C++17
0 / 70
1581 ms2472 KiB
#include<bits/stdc++.h> using namespace std; #define int long long long long t, a, b, c, d, s, s1; vector<int> prime; int calc(int u,int v) { int k = 0; while (u) { k += u/v; u /= v; } return k; } signed main() { for(int i = 2; i <= 10000000; ++i) { bool check = 0; for(int j = 2; j * j <= i; ++j) { if(i % j == 0) { check = 1; break; } } if(!check) prime.push_back(i); } cin >> t; while(t--) { cin >> a >> b >> c >> d; bool check = 0; for (int u : prime) { if (calc(b, u) - calc(a - 1, u) > calc(d, u) - calc(c - 1, u)) { check = true; break; } } if(!check) cout << "DA\n"; else cout << "NE\n"; } }
#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...