# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
768733 | 2023-06-28T14:07:34 Z | 1075508020060209tc | Vepar (COCI21_vepar) | C++14 | 1500 ms | 43936 KB |
#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
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1575 ms | 43620 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1552 ms | 43624 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1578 ms | 43936 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1543 ms | 43616 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1571 ms | 43628 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1561 ms | 43644 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1582 ms | 43624 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |