Search found 96 matches

by uvasarker
Thu Jun 14, 2012 8:30 am
Forum: Volume 119 (11900-11999)
Topic: 11900 - Boiled Eggs
Replies: 14
Views: 2055

Re: 11900

I am getting WA please help me

Code: Select all

/* Removed */
by uvasarker
Wed Jun 13, 2012 10:40 am
Forum: Volume 120 (12000-12099)
Topic: 12085 - Mobile Casanova
Replies: 15
Views: 3177

Re: 12085 Mobile Casanova -- Why WA?

Guru continuously W A #include <cstdio> int main() { unsigned long n, prm[100010], tmp[100010],cas=0; //freopen("in.txt","r",stdin); while(scanf("%lu",&n)==1) { if(n==0) break; for(unsigned long i=0 ; i<n ; i++) { scanf("%lu",&prm[i]); } if(cas>0) printf("\n"); printf("Case %lu:\n",++cas); int signa...
by uvasarker
Tue Jun 12, 2012 8:12 pm
Forum: Volume 9 (900-999)
Topic: 914 - Jumping Champion
Replies: 37
Views: 17202

Re: 914 - Jumping Champion

Guru, I think I can't solve this problem. Updated according to your suggestion but TTTTT LLLLLLL EEEEE #include <cstdio> #include <cmath> bool sieve[10001011]={0}; int main() { unsigned long T, i, j; unsigned long KK=1,PRIM[100001],S=1,E,M; sieve[0]=1; sieve[1]=1; // 0 == prime & 1 == non-prime PRIM...
by uvasarker
Mon Jun 11, 2012 8:27 pm
Forum: Volume 123 (12300-12399)
Topic: 12342 - Tax Calculator
Replies: 33
Views: 15054

Re: 12342 Tax Calculator

do look like this double rest=0.0, tmp=0.0, tax=0.0; tmp=n-180000; n=n-180000; if(tmp>300000){ tax+=0.1*300000.0; n=n-300000.0; tmp=n; } else if(n>0){ tax+=0.1*tmp; n=n-300000.0; tmp=n; } tax=(ceil)(tax); //printf("tax= %.0lf\n",tax);//tmp1=n-400000; if(tmp>400000){ tax+=0.15*400000.0; n=n-400000; t...
by uvasarker
Mon Jun 11, 2012 8:26 pm
Forum: Volume 9 (900-999)
Topic: 914 - Jumping Champion
Replies: 37
Views: 17202

Re: 914 - Jumping Champion

Boss Updated. But, till T L E

Code: Select all

/* Stupid problem. Try this if you want to increase the temperature of you head */
by uvasarker
Sat Jun 09, 2012 1:54 pm
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 38345

Re: 10013 - Super Long Sums

Thanks a lot boss.
I got AC
by uvasarker
Fri Jun 08, 2012 8:57 am
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 38345

Re: 10013 - Super Long Sums

Please help me Why I am getting W A continuously........

Code: Select all

AC
by uvasarker
Thu Jun 07, 2012 8:55 pm
Forum: Volume 3 (300-399)
Topic: 353 - Pesky Palindromes
Replies: 43
Views: 11914

Re: 353 --- Nice Tests...

Boss, Still W A............plz help #include <cstdio> #include <cstring> #include <cctype> int palin(char s[100]) { char *rn; int ln=strlen(s),k=0,p=0,lm; lm=ln/2; for(int i=0 ; i<lm ; i++) { for(int j=0 ; j<lm-i ; j++) { if(s[j]==s[(lm-1-i)-j]) k=1; else { k=0; break; } } if(k==1) { p++; k=0; } } p...
by uvasarker
Thu Jun 07, 2012 8:52 pm
Forum: Volume 120 (12000-12099)
Topic: 12085 - Mobile Casanova
Replies: 15
Views: 3177

Re: 12085 Mobile Casanova -- Why WA?

Hi Boss,
Continuously I am getting W A. Help me more please.

Code: Select all

Mobile
by uvasarker
Thu Jun 07, 2012 6:11 pm
Forum: Volume 123 (12300-12399)
Topic: 12342 - Tax Calculator
Replies: 33
Views: 15054

Re: 12342 Tax Calculator

Use double for tax calculating and also ceil the value of tax after each tax calculation.
by uvasarker
Wed Jun 06, 2012 3:52 pm
Forum: Volume 123 (12300-12399)
Topic: 12342 - Tax Calculator
Replies: 33
Views: 15054

12342 - Tax Calculator

I am getting W A.
Please anyone help me.

Code: Select all

/* Removed After AC*/
/* Thanks to Allah*/
by uvasarker
Wed Jun 06, 2012 3:37 pm
Forum: Volume 3 (300-399)
Topic: 353 - Pesky Palindromes
Replies: 43
Views: 11914

Re: 353 --- Nice Tests...

Boss Still W A............ #include <cstdio> #include <cstring> #include <cctype> int palin(char s[100]) { char *rn; int ln=strlen(s),k=0,p=0,lm; lm=ln/2; for(int i=0 ; i<lm ; i++) { for(int j=0 ; j<lm-i ; j++) { if(s[j]==s[(lm-1-i)-j]) k=1; else { k=0; break; } } if(k==1) { p++; k=0; } } p--; for(i...
by uvasarker
Wed Jun 06, 2012 3:30 pm
Forum: Volume 120 (12000-12099)
Topic: 12085 - Mobile Casanova
Replies: 15
Views: 3177

Re: 12085 Mobile Casanova -- Why WA?

Hi boss, continuously getting W A................ Plz help. #include <cstdio> int main() { unsigned long n, prm[100010], tmp[100010],cas=0; //freopen("in.txt","r",stdin); while(scanf("%lu",&n)==1) { if(n==0) break; for(unsigned long i=0 ; i<n ; i++) { scanf("%lu",&prm[i]); } if(cas>0) printf("\n"); ...
by uvasarker
Mon Jun 04, 2012 6:28 pm
Forum: Volume 9 (900-999)
Topic: 914 - Jumping Champion
Replies: 37
Views: 17202

Re: 914 - Jumping Champion

Hi boss still TLE.

Code: Select all

Cuttttttttttttt
by uvasarker
Mon Jun 04, 2012 3:41 pm
Forum: Volume 3 (300-399)
Topic: 353 - Pesky Palindromes
Replies: 43
Views: 11914

353 --- Pesky Palindromes---WA

Please help me. I am getting W A......continuously here is my code: #include <cstdio> #include <cstring> #include <cctype> int palin(char s[100]) { char *rn; int ln=strlen(s),k=0,p=0,lm; lm=ln/2; for(int i=0 ; i<lm ; i++) { for(int j=0 ; j<lm-i ; j++) { if(s[j]==s[(lm-1-i)-j]) k=1; else { k=0; break...

Go to advanced search