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

제출 #464450

#제출 시각아이디문제언어결과실행 시간메모리
464450TheScrasseVepar (COCI21_vepar)C++14
70 / 70
342 ms43864 KiB
#include <bits/stdc++.h> using namespace std; #define nl "\n" #define nf endl #define ll long long #define pb push_back #define _ << ' ' << #define INF (ll)1e18 #define mod 998244353 #define maxn 10000010 int i, i1, j, k, k1, t, n, m, res, flag[10], a, b, c, d, er[maxn]; vector<int> pr; int pdc(int a, int p) { if (a < p) return 0; return a / p + pdc(a / p, p); } int main() { ios::sync_with_stdio(0); cin.tie(0); /* #if !ONLINE_JUDGE && !EVAL ifstream cin("input.txt"); ofstream cout("output.txt"); #endif */ for (i = 0; i < maxn; i++) er[i] = i; for (i = 2; i < maxn; i++) { if (er[i] != i) continue; for (j = 2 * i; j < maxn; j += i) er[j] = i; } for (i = 2; i < maxn; i++) { if (er[i] == i) pr.pb(i); } cin >> t; while (t--) { cin >> a >> b >> c >> d; flag[0] = 1; for (auto u : pr) { if (pdc(d, u) - pdc(c - 1, u) - pdc(b, u) + pdc(a - 1, u) < 0) flag[0] = 0; } if (flag[0] == 1) cout << "DA" << nl; else cout << "NE" << nl; } 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...