Search found 38 matches

by bgcsaif
Sat Jul 04, 2015 4:22 pm
Forum: Volume 15 (1500-1599)
Topic: 1559 - Nim
Replies: 1
Views: 1827

Re: 1559 - Nim

Is here anyone who solved the problem? I am not understanding the statements clearly. Can anyone help me describing the problem with respect to 3rd input output, plz?
by bgcsaif
Sun May 10, 2015 4:04 am
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 17316

Re: 369 - Combinations

Getting WA! Tried some inputs.... It works fine.... :-( #include <stdio.h> int main() { long long int n, m, i, j, a, c, s, s2, k; while (scanf("%lld %lld", &n, &m) == 2) { if (n == 0 && m == 0) break; k = m; a = n - m; if (a < m) { c = a; a = m; m = c; } a = a + 1, s = 1, s2 = 1; while (a <= n) { s ...
by bgcsaif
Sun May 10, 2015 4:01 am
Forum: Volume 104 (10400-10499)
Topic: 10469 - To Carry or not to Carry
Replies: 24
Views: 10471

Re: 10469 - To Carry or not to Carry

Oja! Thank you.... I got AC using ^ But I fund no error in my code. It does the exact thing. My codes count the sum ignoring carry bit. I think my code has faced data type problem. I stored summation in a variable. If both numbers are big enough then my summing variable will have to handle twice of ...
by bgcsaif
Sun May 10, 2015 3:59 am
Forum: Volume 104 (10400-10499)
Topic: 10469 - To Carry or not to Carry
Replies: 24
Views: 10471

Re: 10469 - To Carry or not to Carry

Oja! Thank you.... I got AC using ^ But I fund no error in my code. It does the exact thing. My codes count the sum ignoring carry bit. I think my code has faced data type problem. I stored summatiare on in a variable. If both numbers are big enough then my summing variable will have to handle twice...
by bgcsaif
Sun May 03, 2015 12:43 pm
Forum: Volume 105 (10500-10599)
Topic: 10533 - Digit Primes
Replies: 108
Views: 31766

Re: 10533 - Digit Primes

Is there anyone? I need help....
by bgcsaif
Fri May 01, 2015 3:05 pm
Forum: Volume 104 (10400-10499)
Topic: 10469 - To Carry or not to Carry
Replies: 24
Views: 10471

Re: 10469 - To Carry or not to Carry

I used long long int to catch the range. Checked maximum bits of the largest number and the sum. Decided to print normally addition value if no carry bit. if there is any, i printed the value subtracting the place value for last Digit. I got WA. Help me with critical inputs or any hints to debug my ...
by bgcsaif
Thu Mar 26, 2015 8:59 am
Forum: Volume 105 (10500-10599)
Topic: 10533 - Digit Primes
Replies: 108
Views: 31766

Re: 10533 - Digit Primes

I am tired of TLE for this problem.... First I tried it manual then I tried it with sieve method..... But yet I am having TLE.... Help me to with any clues plz.....
http://ideone.com/uTTQz8
by bgcsaif
Sun Jan 11, 2015 10:03 am
Forum: Volume 100 (10000-10099)
Topic: 10013 - Super long sums
Replies: 212
Views: 39901

Re: 10013 - Super long sums

it is said that "each of the two given integers is not less than 1"..... but in sample input there is given 0 as one of the integers..... is there anything i understood wrong???
by bgcsaif
Wed Nov 19, 2014 6:32 am
Forum: Volume 105 (10500-10599)
Topic: 10533 - Digit Primes
Replies: 108
Views: 31766

Re: 10533 - Digit Primes

I am getting TLE for the problem. Can anyone help.me to make it work faster please? #include <stdio.h> #include <math.h> int prime(int n) { int i, a = 1; for (i = 2; i <= sqrt(n); i++) if (n % i == 0) { a = 0; break; } if (n < 2) a = 0; if (a == 1) return 1; else return 0; } int main() { int t, n, m...
by bgcsaif
Sun Oct 12, 2014 9:06 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 79268

Re: 10038 - Jolly Jumpers

Thanks!!! I GOT AC :-) :-) I don't know how to thank you....
by bgcsaif
Wed Oct 08, 2014 12:21 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 79268

Re: 10038 - Jolly Jumpers

Oops! I left some points unchanged.
I am simply tempered with this problem. Can you check it again please? Here is my new codes.
http://ideone.com/M842Yl
by bgcsaif
Tue Oct 07, 2014 8:30 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 79268

Re: 10038 - Jolly Jumpers

It's still WA. . . .
http://ideone.com/nOw2Pd
by bgcsaif
Tue Oct 07, 2014 1:09 pm
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 79268

Re: 10038 - Jolly Jumpers

4
1 3 2 -2
Here, 1-3=2, 3-2=1, 2-(-2)=4
2,1,4=> 1,2,4
Ain't that jolly?
3
4 1 3
Here too, 4-1=3, 1-3=2
3,2=>2,3
Ain't that jolly too?
Please, brief me the task. May be i didn't understand it properly. . . .
by bgcsaif
Tue Oct 07, 2014 6:36 am
Forum: Volume 100 (10000-10099)
Topic: 10038 - Jolly Jumpers
Replies: 445
Views: 79268

Re: 10038 - Jolly Jumpers

i got WA. . . . Can you help me to correct it?
http://ideone.com/FJcIim
by bgcsaif
Tue Oct 07, 2014 5:38 am
Forum: Volume 100 (10000-10099)
Topic: 10093 - An Easy Problem!
Replies: 52
Views: 14996

Re: 10093 - An Easy Problem!

Thanks! I got AC. . . :)

Go to advanced search