Search found 2 matches

by chaos_rulz
Mon Sep 19, 2005 10:16 am
Forum: Volume 103 (10300-10399)
Topic: 10394 - Twin Primes
Replies: 101
Views: 48529

finally got AC
i jst changed it to a C code and made appropriate modifications...
by chaos_rulz
Mon Sep 19, 2005 9:20 am
Forum: Volume 103 (10300-10399)
Topic: 10394 - Twin Primes
Replies: 101
Views: 48529

10394 - TLE

here is my code...




#include<iostream>
#include<stdio.h>
#include<vector>
#include<math.h>

using namespace std;
const int MAX=18409202;

main()
{
vector<bool> primes(MAX,true);
vector<int> pairs;

int i;
primes[0]=primes[1]=false;

/*filter out even nos*/
for(i=4;i<=MAX;i+=2)
primes[i ...

Go to advanced search