# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
7591 | dohyun0324 | 경비원 (GA8_guard) | C++98 | 380 ms | 1372 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
int cnt,n,a[2510],m,ch[30],w,b[2510],cnt2;
long long int dap,d[2][17000];
int p[20]={0,2,3,5,7,11,13,17,19,23,29,31,37,41,43};
int gcd(int x,int y)
{
if(x%y==0) return y;
return gcd(y,x%y);
}
void dfs(int x)
{
int i;
if(x==n)
{
if(w>=2)
{
cnt++;
}
return;
}
dfs(x+1);
for(i=1;i<=w;i++)
{
if(gcd(ch[i],a[x+1])!=1) break;
}
if(i!=w+1) return;
ch[++w]=a[x+1];
dfs(x+1);
ch[w--]=0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |