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

#TimeUsernameProblemLanguageResultExecution timeMemory
872975aegVepar (COCI21_vepar)C++14
30 / 70
1571 ms960 KiB
#include<bits/stdc++.h> using namespace std; #define F first #define S second map<int, int> ab, cd; inline void factorize(int i, bool b) { for(int j=2; j<=i; j++) { while(i%j==0) { if(b) ab[j]++; else cd[j]++; i/=j; } } } inline void solve() { int a,b,c,d; cin >> a >> b >> c >> d; for(int i=a; i<=b; i++) factorize(i, true); for(int i=c; i<=d; i++) factorize(i, false); for(auto x:ab) { if(cd[x.F]<x.S) { cout << "NE\n"; ab.clear(); cd.clear(); return; } } ab.clear(); cd.clear(); cout << "DA\n"; } int main() { int t; cin >> t; while(t--) solve(); }
#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...