# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
768732 | 2023-06-28T14:06:56 Z | 1075508020060209tc | Vepar (COCI21_vepar) | C++14 | 1294 ms | 43672 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<=1000000;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 | Correct | 1115 ms | 43608 KB | Output is correct |
2 | Correct | 1294 ms | 43628 KB | Output is correct |
3 | Correct | 1073 ms | 43636 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1152 ms | 43620 KB | Output is correct |
2 | Correct | 1154 ms | 43612 KB | Output is correct |
3 | Correct | 1191 ms | 43580 KB | Output is correct |
4 | Correct | 1120 ms | 43656 KB | Output is correct |
5 | Correct | 976 ms | 43628 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1218 ms | 43648 KB | Output is correct |
2 | Correct | 1118 ms | 43624 KB | Output is correct |
3 | Correct | 1119 ms | 43632 KB | Output is correct |
4 | Correct | 1177 ms | 43636 KB | Output is correct |
5 | Correct | 1150 ms | 43620 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 919 ms | 43612 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1177 ms | 43644 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1182 ms | 43672 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1187 ms | 43636 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |