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: 17210

Re: 11479

Thanks Leonid,
changed long to long long and ACC
Sun Aug 03, 2008 9:39 pm
Forum: Volume 114 (11400-11499)
Topic: 11479 - Is this the easiest problem?
Replies: 48
Views: 17210

11479 - Is this the easiest problem?

I am getting WA in this simple problem.
PLzz help me with some critical inputs.

Code: Select all

``````GOT ACC
``````
Edit: Title Modified by Moderator.
Mon Jul 21, 2008 12:23 pm
Forum: Volume 105 (10500-10599)
Topic: 10533 - Digit Primes
Replies: 108
Views: 31103

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 dprime[...
Tue Jul 15, 2008 3:25 pm
Forum: Volume 103 (10300-10399)
Topic: 10394 - Twin Primes
Replies: 101
Views: 31784

Re: 10394 - Twin Primes

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: 31784

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> using ...
Fri Jul 11, 2008 6:57 pm
Forum: Volume 113 (11300-11399)
Topic: 11342 - Three-square
Replies: 14
Views: 6532

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++) { for(k=j;k<=t;k+...