# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
7345 | kriii | 경비원 (GA8_guard) | C++98 | 356 ms | 1540 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>
#include <vector>
const long long mod = 1000000007;
long long ans; int divs[2223],isp[2223],ind[48],cha[2223],p;
std::vector<int> gath[2223],sm;
int pr[1<<15],nx[1<<15];
int N;
int ch(int x)
{
int r = 0;
for (int i=2;i<48;i++) if (!isp[i] && x % i == 0) r |= 1 << ind[i];
return r;
}
int main()
{
scanf ("%d",&N);
for (int i=2;i<=2222;i++) if (!isp[i]){
for (int j=i;j<=2222;j+=i) divs[j] = i;
for (int j=i*i;j<=2222;j+=i) isp[j] = 1;
}
for (int i=2;i<48;i++) if (!isp[i]){
ind[i] = p++;
}
for (int i=2;i<=2222;i++) cha[i] = ch(i);
for (int i=0,x;i<N;i++){
# | 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... |