# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
367379 | 2021-02-17T04:17:25 Z | chubyxdxd | Vepar (COCI21_vepar) | C++11 | 1500 ms | 48980 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MAX=1e7; vector<bool> sieve(MAX+5,true); vector<int> y; int main(){ int t; for(int i=2;i<=MAX+5;i++){ if(sieve[i]==false)continue; y.push_back(i); for(ll j=i+i;j<=MAX+5;j+=i){ sieve[j]=false; } } scanf("%d",&t); while(t--){ int a,b,c,d; scanf("%d %d %d %d",&a,&b,&c,&d); map<int,int> mpa,mpb; for(int i=0;i<y.size() && y[i]<=b;i++){ int aux=1; while(aux<=b){ aux*=y[i]; int cur=b/aux-(a-1)/aux; mpa[y[i]]+=cur; } } for(int i=0;i<y.size() && y[i]<=d;i++){ int aux=1; while(aux<=d){ aux*=y[i]; int cur=d/aux-(c-1)/aux; mpb[y[i]]+=cur; } } int sw=1; for(auto it=mpa.begin();it!=mpa.end();it++){ int fi=(*it).first; int se=(*it).second; if(mpb[fi]<se)sw=0; } if(sw)printf("DA\n"); else printf("NE\n"); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 88 ms | 5872 KB | Output is correct |
2 | Correct | 89 ms | 5724 KB | Output is correct |
3 | Correct | 86 ms | 5724 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 88 ms | 5852 KB | Output is correct |
2 | Correct | 91 ms | 5852 KB | Output is correct |
3 | Correct | 91 ms | 5724 KB | Output is correct |
4 | Correct | 98 ms | 5724 KB | Output is correct |
5 | Correct | 89 ms | 5724 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 89 ms | 5724 KB | Output is correct |
2 | Correct | 88 ms | 5724 KB | Output is correct |
3 | Correct | 90 ms | 5724 KB | Output is correct |
4 | Correct | 87 ms | 5724 KB | Output is correct |
5 | Correct | 87 ms | 5852 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1592 ms | 30372 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1591 ms | 48980 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1587 ms | 48912 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1596 ms | 48924 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |