(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #768732

#TimeUsernameProblemLanguageResultExecution timeMemory
7687321075508020060209tcVepar (COCI21_vepar)C++14
30 / 70
1294 ms43672 KiB
#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 (stderr)

Main.cpp: In function 'void solve()':
Main.cpp:13:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 | for(int pid=0;pid<prm.size();pid++){
      |               ~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...