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

#TimeUsernameProblemLanguageResultExecution timeMemory
747382vjudge1Vepar (COCI21_vepar)C++17
30 / 70
63 ms10104 KiB
#include <bits/stdc++.h> using namespace std; #define int long long const int maxn = 1e7+1; bool prim[maxn]; vector<int> primek; int szamol(int a, int p){ int r = 0; for(int i = p; i <= a; i *= p){ r += a/i; } return r; } void solve(){ int a, b, c, d; cin>>a>>b>>c>>d; for(int p : primek){ if(szamol(d, p)-szamol(c-1, p) < szamol(b, p)-szamol(a-1, p)){ cout<<"NE\n"; return; } } cout<<"DA\n"; } main(){ ios_base::sync_with_stdio(0); cin.tie(0); for(int i = 2; i * i <= maxn; i++){ if(!prim[i]){ primek.push_back(i); for(int j = i*i; j <= maxn; j+=i){ prim[j] = 1; } } } int t; cin>>t; while(t--)solve(); return 0; }

Compilation message (stderr)

Main.cpp:31:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   31 | main(){
      | ^~~~
#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...