Number Theory

Party all the time

February 20, 2013 Number Theory No comments

Party All the Time
Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 829 Accepted Submissi[……]

Read more

February 20, 2013 Number Theory No comments

note: This article comes from the Internet. Please contact me via lethic@163.com if there is any infringement.
lethic@163.com.

[……]

Read more

String Change

February 20, 2013 Number Theory No comments

String change
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 370 Accepted Submission(s)[……]

Read more

Mark the Rope

February 20, 2013 Number Theory No comments

Mark the Rope

Time Limit: 20000/10000 MS (Java/Others)

Lucas

note: This article comes from the Internet. Please contact me via lethic@163.com if there is any infringement.
lethic@163.com.

[……]

Read more

arcane number1

Arcane Numbers 1
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1687 Accepted Submissio[……]

Read more

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//0maxmprime12forj+iprime0
 
#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int const maxm=1000001;
int prime[maxm];
void sievePrime()
{
	for(int i=0;i<maxm;i++)
		prime[i]=1;
	prime[0]=0;
	prime[1]=0;
	int max=sqrt(maxm*1.0);
	for(int i=2;i<=max;i++)
	{
		if(prime[i])
		for(int j=i+i;j<maxm;j=j+i)
		{
			prime[j]=0;
		}
	}
}
int main()
{
	sievePrime();
	int i;
	for(i=0;i<100;i++){
		if(prime[i])
		printf("\n%d\n",i);
	}
	return 0;
}

meeting point-1

Meeting point-1
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 987 Accepted Submission([……]

Read more