# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
768723 | 1075508020060209tc | Vepar (COCI21_vepar) | C++14 | 1583 ms | 43744 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define X first
#define Y second
int ttt;
vector<int>prm;
int prmtbl[10000007];
int A;int B;int C;int D;
void solve(){
cin>>A>>B>>C>>D;
for(int pid=0;pid<prm.size();pid++){
int ac=0;int bc=0;
int p=prm[pid];
for(int i=p;i<=10000000;i+=p){
int v=i;
int vc=0;
while(v%p==0){
vc++;
v/=p;
}
if(i>=A&&i<=B){
ac+=vc;
}
if(i>=C&&i<=D){
bc+=vc;
}
}
if(ac>bc){
cout<<"NE\n";return;
}
}
cout<<"DA\n";
}
signed main(){
for(int i=2;i<=10000000;i++){
if(prmtbl[i]==0){
prm.push_back(i);
}
for(int j=i+i;j<=10000000;j+=i){
prmtbl[j]=1;
}
}
cin>>ttt;
while(ttt--)solve();
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |