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

#TimeUsernameProblemLanguageResultExecution timeMemory
588417MilosMilutinovicVepar (COCI21_vepar)C++14
70 / 70
209 ms5788 KiB
/** * author: wxhtzdy * created: 03.07.2022 11:06:33 **/ #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); const int MAX = 1e7 + 5; vector<bool> pr(MAX, true); for (int i = 2; i < MAX; i++) { if (pr[i]) { for (long long j = i * 1LL * i; j < MAX; j += i) { pr[j] = false; } } } vector<int> primes; for (int i = 2; i < MAX; i++) { if (pr[i]) { primes.push_back(i); } } auto Count = [&](int x, int L, int R) { long long p = x, cnt = 0; while (p <= R) { cnt += (R / p - (L - 1) / p); p *= x; } return cnt; }; int tt; cin >> tt; while (tt--) { int a, b, c, d; cin >> a >> b >> c >> d; bool ok = true; for (int i = 0; i < (int) primes.size(); i++) { if (Count(primes[i], a, b) > Count(primes[i], c, d)) { ok = false; break; } } cout << (ok ? "DA" : "NE") << '\n'; } 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...