# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
768736 | 2023-06-28T14:09:41 Z | 1075508020060209tc | Vepar (COCI21_vepar) | C++14 | 195 ms | 524288 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]; unordered_map<int,int>mp[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; if(mp[p][v]==0){ while(v%p==0){ vc++; v/=p; } mp[p][v]=vc; } vc=mp[p][v]; 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
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 195 ms | 524288 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 165 ms | 524288 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 185 ms | 524288 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 168 ms | 524288 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 168 ms | 524288 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 164 ms | 524288 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 164 ms | 524288 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |