Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7800 - Graph

Problem text...

Input

Input description...

Output

Output description...

Example

Input:
etc.

Output:
etc.

Нэмсэн:Bataa
Огноо:2013-11-12
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2023-04-16 16:21:45
asd

Last edit: 2023-05-31 13:10:41
2020-01-21 14:32:40 Bataa
#include

#define ll long long

using namespace std;

struct pq {
ll d, id, z;
};

pq a[1000006];

bool cmp(pq x, pq y){
if(x.z==y.z){
return x.id } else return x.z}

ll Prime(ll x, ll y){
ll q,i,j,t;

if(y==2){
return 2;
}

for(i=y; i>=x; i--){
q=i;
if(i%2==0){
q=-1;
} else{
t=sqrt(i);
for(j=3; j<=t; j=j+2){
if(i%j==0){
q=-1; j=t;
}
}
}
if(q!=-1){
q=i;
i=x;
}
}

return q;
}

int main(){
//freopen("a.in","r",stdin);
//freopen("a.out","w",stdout);

cin.tie(NULL);
cout.tie(NULL);
ios_base::sync_with_stdio(NULL);
ll x,y,n,k,i,p,q;

cin>>x>>y;

p=Prime(x,y);
cin>>n;
for(i=0; i cin>>k;
a[i].d=k;
a[i].id=i;
q=0;
while(k%p==0){
q++;
k=k/p;
}
a[i].z=q;
}
sort(a, a+n, cmp);

for(i=0; i cout< }
cout<
return 0;
cin.tie(NULL);
cout.tie(NULL);
ios_base::sync_with_stdio(NULL); }
2020-01-10 13:13:50
whut? yaj bodsiin bee bolqu bhiin

2020-01-08 05:41:49
zugeer ym bchghuby
2020-01-08 05:41:48
zugeer ym bchghuby
2019-08-26 09:00:47
yu gutsaad bnaa
2019-04-05 14:59:35
temdegt moroor bodn
2016-03-06 04:32:33 poxaxa
өгүүлбэргүй бодлогыг яаж бодоод байна энэ хүмүүс
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.