[algogeeks] Re: how to solve

2012-04-13 Thread him
hi , thanks for pointing that out. I corrected the code but still getting a WA. Any possible reasons? code: http://ideone.com/bnz52 On Apr 13, 8:13 am, Tushar tushicom...@gmail.com wrote: 2 3 1 1 1 5 1 2 3 1 2 O/P should be: 0 6 Your O/P is 3 9 -- You received this message because

[algogeeks] Re: how to solve

2012-04-11 Thread him
hi , i solved it using the modified merge sort routine, but i'm getting WA. Can u plz help me with some test cases? code: http://ideone.com/9kYz5 On Apr 10, 9:00 pm, Anurag Gupta anurag.gupta...@gmail.com wrote: you dont need that much to do this problem modify merge method in mergesort to

[algogeeks] anybody c output?

2012-01-22 Thread him
http://ideone.com/hOdAt code: #include stdio.h char *p = Hello World; #define PTR (char *) char a[10]; void initA() { int i; PTR p; for ( p = a,i = 0; i 5; i++) {*p++='a' +i;} } int main(void) { initA(); printf(%s\n, p); getchar(); return 0; } -- You received this message because you

[algogeeks] can anybody explain the output

2012-01-17 Thread him
/* test.c */ #include stdio.h #include ctype.h void fn(int x, int y); int main(void) { int a = 4; int b = -4; printf([%s, %s, %c]\n, \12 3, \123, \123); printf([a: %d, b: %d]\n, a-1, b1); printf(Mod variants: 5,3 [Q: %2d, R: %2d]\n, 5/3, 5%3); printf(Mod variants: -5,3 [Q: %2d, R:

[algogeeks] Re: can any body explain the output and the general method

2011-09-23 Thread him
points. Therefore, the output is compiler dependent. Dave On Sep 21, 6:40 pm, him himanshuarora.1...@gmail.com wrote: http://www.ideone.com/8iPGF int main() { int i=5; printf(%d, ++i + ++i + ++i); return 0; } output : 22 why 22? can anybody spell out the reasons

[algogeeks] can any body explain the output and the general method

2011-09-21 Thread him
http://www.ideone.com/8iPGF int main() { int i=5; printf(%d, ++i + ++i + ++i); return 0; } output : 22 why 22? can anybody spell out the reasons and the general way in which the expression in evaluated in such cases? -- You received this message because you are subscribed to the Google

[algogeeks] solving a simple equation

2011-08-30 Thread him
finding number of integral solution of the equation ab+cd=a+d+b+c (1=a=b=c=d) (any efficient method ) -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this

[algogeeks] Re: spoj coin tossing

2011-08-24 Thread him
1st one H-2^1+1 HTHT-2^4+4 TTHTHTHTHTHHTHTHTHTTHTHTT(33) - 2^33+6(why)? do you see any connection? On Aug 24, 6:55 am, keyankarthi keyankarthi1...@gmail.com wrote: http://www.spoj.pl/problems/MAIN8_D/ i tried solving this problem any ideas...?? for second test case 'htht' the