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

제출 #396176

#제출 시각아이디문제언어결과실행 시간메모리
396176MrRobot_28Vepar (COCI21_vepar)C++17
70 / 70
519 ms1488 KiB
#include<bits/stdc++.h> using namespace std; #define X first #define Y second #define sz(a) (int)a.size() #define ll long long const int N = 1e7; const int T = 20; signed main() { // ifstream cin("input1.txt.4c"); ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; vector <bool> pr(N + 1, 1); for(int i = 2; i <= N; i++) { int j = i * 2; while(j <= N) { pr[j] = 0; j += i; } } while(t--) { int a, b, c, d; cin >> a >> b >> c >> d; int fl = 1; for(int j = 2; j <= N; j++) { if(pr[j]) { int k = j; int s1 = 0, s2 = 0; while(1) { s1 += ((b / k) - ((a - 1) / k)); s2 += ((d / k) - ((c - 1) / k)); if(N / j < k) { break; } k *= j; } if(s2 < s1) { fl = 0; } } } if(fl) { 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...