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

제출 #474622

#제출 시각아이디문제언어결과실행 시간메모리
474622mychecksedadVepar (COCI21_vepar)C++17
70 / 70
235 ms9912 KiB
#include<bits/stdc++.h> using namespace std; typedef long long int ll; #define pb push_back #define all(x) x.begin(), x.end() const int N = 1e7+10; int a, b, c, d, T, x, y; vector<ll> primes; vector<bool> is(N); int main(){ cin.tie(0); ios::sync_with_stdio(0); for(int i = 2; i < N; i++){ if(!is[i]){ primes.pb(i); for(int j = i; j < N; j += i) is[j] = 1; } } cin >> T; while(T--){ cin >> a >> b >> c >> d; bool ok = 1; for(ll p: primes){ x = y = 0; ll e = p; while(e <= max(b, d)){ ll n = ((a+e-1) / e); ll m = (b / e); x += max(0LL, m-n+1); n = ((c+e-1) / e); m = (d / e); y += max(0LL, m-n+1); e *= p; } if(x>y) ok = 0; } if(ok) cout << "DA\n"; else cout << "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...