Thanks Leonid,
changed long to long long and ACC
Search found 6 matches
- Mon Aug 04, 2008 10:39 am
- Forum: Volume 114 (11400-11499)
- Topic: 11479 - Is this the easiest problem?
- Replies: 48
- Views: 27086
- Sun Aug 03, 2008 9:39 pm
- Forum: Volume 114 (11400-11499)
- Topic: 11479 - Is this the easiest problem?
- Replies: 48
- Views: 27086
11479 - Is this the easiest problem?
I am getting WA in this simple problem.
PLzz help me with some critical inputs.
Edit: Title Modified by Moderator.
PLzz help me with some critical inputs.
Code: Select all
GOT ACC
- Mon Jul 21, 2008 12:23 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10533 - Digit Primes
- Replies: 108
- Views: 47593
Re: 10533 - Digit Primes
PLZZ Help...I am Getting TLE in this problem
I used sieve for prime & dprime.Current sieve takes around 0.2-0.3 seconds for calculation.Can anyone help me out...how optimization can be done??
Here is my code...
#include<iostream>
#include<cmath>
using namespace std;
bool prime[1000001];
bool ...
I used sieve for prime & dprime.Current sieve takes around 0.2-0.3 seconds for calculation.Can anyone help me out...how optimization can be done??
Here is my code...
#include<iostream>
#include<cmath>
using namespace std;
bool prime[1000001];
bool ...
- Tue Jul 15, 2008 3:25 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10394 - Twin Primes
- Replies: 101
- Views: 48522
Re: 10394 - Twin Primes
Thanks Jan for your reply.
As far as system("pause") is concerned,it does not make any kind of problem.
I have submitted many problems in UVa with system("pause").
or Does using system("pause") increases runtime??
Plz Can u explain how Bit-wise sieve is done?
As far as system("pause") is concerned,it does not make any kind of problem.
I have submitted many problems in UVa with system("pause").
or Does using system("pause") increases runtime??
Plz Can u explain how Bit-wise sieve is done?
- Sun Jul 13, 2008 1:53 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10394 - Twin Primes
- Replies: 101
- Views: 48522
Re: 10394 - Twin Primes
Hi!! everyone...
I am fed up with this question...
changed my sieve method lot of time.
my present sieve method takes around 1.1-1.2 seconds.I also used the concept of twin primes around multiples of 6...
then also getting TLE...
PLZ Help..here is my code...
#include<iostream>
#include<cmath ...
I am fed up with this question...
changed my sieve method lot of time.
my present sieve method takes around 1.1-1.2 seconds.I also used the concept of twin primes around multiples of 6...
then also getting TLE...
PLZ Help..here is my code...
#include<iostream>
#include<cmath ...
- Fri Jul 11, 2008 6:57 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11342 - Three-square
- Replies: 14
- Views: 9172
11342 - Three-square
My code is getting TLE....plz help
what kinda optimization can be done ???
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int i,j,k,n,test;
scanf("%d",&test);
while(test--)
{
scanf("%d",&n);
int flag=0;
int t=(int)sqrt(n);
for(i=0;i<=t;i++)
{
for(j=i;j<=t;j ...
what kinda optimization can be done ???
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int i,j,k,n,test;
scanf("%d",&test);
while(test--)
{
scanf("%d",&n);
int flag=0;
int t=(int)sqrt(n);
for(i=0;i<=t;i++)
{
for(j=i;j<=t;j ...