MOUSETRAP PROBLEM from GCJ 2008 ROUND 1B

2009-08-12 Thread Shoubhik
Problem Mousetrap is a simple card game for one player. It is played with a shuffled deck of cards numbered 1 through K, face down. You play by revealing the top card of the deck and then putting it on the bottom of the deck, keeping count of how many cards you have revealed. If you reveal a ca

Re: Where are yuo from?

2009-08-14 Thread Shoubhik
IM FROM INDIA !!1 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-code@googlegroups.com To unsubscribe from this group, send email to goog

Re: MOUSETRAP PROBLEM from GCJ 2008 ROUND 1B

2009-08-14 Thread Shoubhik
i had coded da problem... had got INCORRECT... it was because of my wrong interpretation. thank you guys,.. i'll code it again and let you know.. Thanks and regards, Shoubhik --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: How much time to write up code?

2009-08-14 Thread Shoubhik
4 min and 8 min is the time in which you have to generate the output file and submit it - So, first you have to write the code. Better you make a test input file and test the input before downloading the input file.. Now, download the input file,.. within 4 minutes, run your progra

Re: Where are yuo from?

2009-08-15 Thread Shoubhik
nope Aditya,.. ! have a nice day buddy! On Aug 14, 1:50 pm, Aditya Bhiday wrote: > On Fri, Aug 14, 2009 at 2:15 PM, Shoubhik wrote: > > > IM FROM INDIA !!1 > > Hey Shoubhik, are you by any random chance the brother of a Koushik and > attended BSS? > If you don

Re: What Language?

2009-08-15 Thread Shoubhik
hii !! I'll b using Java!!! Have a great Day !!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-code@googlegroups.com To unsubscribe from this gr

[gcj] RESULTS OF QUALIFICATION ROUND

2010-05-08 Thread Shoubhik
Have the large inputs been evaluated(thats what i feel).. but I want to be sure, as I havent recieved a notification yet.. -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-c...@googlegroups.com. To un

[gcj] Re: How many problems i need to complete for qualifying?

2010-05-08 Thread Shoubhik
Hiii Dhruva, My scoreboard shows "43"... so this has to be AFTER evaluation ,right??? -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-c...@googlegroups.com. To unsubscribe from this group, send email

[gcj] Re: How many problems i need to complete for qualifying?

2010-05-08 Thread Shoubhik
yeah.. thanx a lot.. I checked it.. that means Ive qualified !!! Yess! -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-c...@googlegroups.com. To unsubscribe from this group, send email to google-cod

[gcj] Re: RESULTS OF QUALIFICATION ROUND

2010-05-08 Thread Shoubhik
Thanks a lot :-) On May 9, 7:06 am, Abhishek Chandel wrote: > On Sun, May 9, 2010 at 7:34 AM, Shoubhik wrote: > > Have the large inputs been evaluated(thats what i feel).. but I want > > to be sure, as I havent recieved a notification yet.. > > > -- > > You receive

[gcj] Re: Topcoder TCO 10 & google-code group

2010-05-08 Thread Shoubhik
anyways , thanks. On May 8, 1:07 am, Moh Ghooo wrote: > Dear All, > > Running during these days is the TopCoder Open Tournament. It includes many > competition tracks; Algorithm, Marathon, Design, Development, Mod Dash as > well as Studio. Although I am unfamiliar with all of these tracks except

[gcj] Re: Onsite finals

2010-05-24 Thread Shoubhik
Your Are right Prayags,.. Im with u :-) Even I share your enthusiasm. -Regards, Shoubhik -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-c...@googlegroups.com. To unsubscribe from this g

[gcj] Re: Onsite finals

2010-05-25 Thread Shoubhik
Prayags, You are right. But there's got to be exceptions,.. 2 time defending champions ACRush is still participating,which means he's not employed :-) :-) -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to go

[gcj] Re: Why code submission is essectial?

2010-05-28 Thread Shoubhik
I usually change the input filename to a shorter name.. example "A1.IN" then i implement it.. fin=fopen("A1.IN","r"); sure,.. if Google tests my program, it wont run,.. as the input file wont open ! It is less likely(not impossible, if automated) that Google would change the filename ... before

[gcj] Re: Why code submission is essectial?

2010-05-31 Thread Shoubhik
Thanks for the info. Regards, Shoubhik On May 29, 12:50 am, Muntasir Khan wrote: > On 28/05/2010, Shoubhik wrote: > > > I usually change the input filename  to a shorter name.. example > > "A1.IN" > > then i implement it.. > > > fin=fopen("A1.IN

[gcj] post incrementation in JAVA... wierd

2010-06-05 Thread Shoubhik
Hello, in C, the following code: int n=10; n=n++; assigns 'n' a value of 11 . in Java, the same code doesnt increment 'n'... it remains 10 !!! plzzz explain... Regards, Shoubhik Bose. -- You received this message because you are subscribed to the Google Groups &q

[gcj] Re: post incrementation in JAVA... wierd

2010-06-05 Thread Shoubhik
Hello Reinier, Thanks a lot. I get your point. " n holds value 10 [after int n = 10] n holds value 11 [after n++] n = 10 [after n = (result of n++)] " this part of your explanation is extremely helpful. No doubt with the Java experience anymore! But isn't the precedence of unary operators Gre

[gcj] Re: Digest for google-code@googlegroups.com - 3 Messages in 2 Topics

2010-08-04 Thread Shoubhik
what about the others who couldn't make it to the finals :-( -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubs

[gcj] problem printing the 256th ASCII character in C

2010-08-04 Thread Shoubhik
Hi, Here's a wierd situation.. unsigned char c; for(c=0;c<=255 ; c++) printf("%c",c); the above code gives an infinite loop in C !!! whereas, if i print unsigned char c=255; prinf("%c",c); the code works fine... Somebody , help me get a work around,

[gcj] Re: problem printing the 256th ASCII character in C

2010-08-04 Thread Shoubhik
Hey Thanks a lot to all of you, I got your point.. Have a good day! Thanks and regards, Shoubhik Bose -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-c...@googlegroups.com. To unsubs

[gcj] Re: problem printing the 256th ASCII character in C

2010-08-04 Thread Shoubhik
for(c=-127;c<=126;c++) printf("%c",c); printf(%c",127); 2) unsigned char c; for(c=0;c<=254;c++) printf("%c",c); printf(%c",255); 3) int i; for(i=0;i<=255;i++) printf("%c",i); Thanks and regards, Shoubhik B

[gcj] Re: Digest for google-code@googlegroups.com - 3 Messages in 2 Topics

2010-08-15 Thread Shoubhik
sorry for the late reply.. you are right, mRabbit.. -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@goog

[gcj] content of include directory

2011-01-03 Thread Shoubhik
Hi, when we write #include we are are referring to the header file stdio.h but where exactly is the code ?? only the function prototypes are visible in stdio.h ? -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send

Re: [gcj] content of include directory

2011-01-03 Thread Shoubhik
Thanks Reiten . Right, I get it. But, but where exactly are those "Implementations of functions" stored/accessed from. ? -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-c...@googlegroups.com. To

Re: [gcj] content of include directory

2011-01-03 Thread Shoubhik
So,that means they are pre-built and are just linked when the situation arises. ( i'm using Borland C++) -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-c...@googlegroups.com. To unsubscribe from th

[gcj] Re: content of include directory

2011-01-03 Thread Shoubhik
ugh source code may be available for information purposes it's never > > used for building new programs. > > > On 03.01.2011 22:55, Shoubhik wrote: > > >> So,that means they are pre-built and are just linked when the situation > >> arises. ( i'm using Borl

[gcj] Re: content of include directory

2011-01-03 Thread Shoubhik
lable for information purposes it's never > > used for building new programs. > > > On 03.01.2011 22:55, Shoubhik wrote: > > >> So,that means they are pre-built and are just linked when the situation > >> arises. ( i'm using Borland C++) -- > >> You

[gcj] Re: data structures and algorithms

2011-01-04 Thread Shoubhik
if you are implementing the deque as linked list.. then its similar to a node in a linkedlist.. On Jan 4, 9:54 am, baer10 wrote: > hi guys... > can anybody what is the notion of "position" in "deque" ? > is it similar to a node ? > can v consider it to b a node ? -- You received this message be

[gcj] Re: data structures and algorithms

2011-01-07 Thread Shoubhik
algorithms in java ? > > > On Tue, Jan 4, 2011 at 3:29 PM, Shoubhik wrote: > > > if you are implementing the deque as linked list.. then its similar to > > > a node in a linkedlist.. > > > > On Jan 4, 9:54 am, baer10 wrote: > > > > hi guys... > &

[gcj] Re: content of include directory

2011-01-07 Thread Shoubhik
Could you please be more precise? On Jan 4, 10:33 am, safol ghadi wrote: > On 1/4/11, Shoubhik wrote: > > > > > > > > > > > Hi, > > > when we write > > > #include > > > we are are referring to the header file stdio.h > >

[gcj] Strings in C

2011-02-27 Thread Shoubhik
#include #include int main(){ char s[3][3]={"000","001","010"}; puts(s[0]); puts(s[1]); puts(s[2]); return 0; } the output im expecting is: 000 001 010 instead, this is the output I'm getting, 01010 001010 010 where am i wrong ? I excuted the cod

[gcj] Re: Strings in C

2011-02-27 Thread Shoubhik
THanks it worked ! :) On Feb 27, 5:01 pm, "Shahansad K.P" wrote: > you have to mark the end of the string. > try char s[3][4]={"000","001","010"}; > > On 27 February 2011 17:27, Shoubhik wrote: > > > #include > > #

[gcj] Re: Strings in C

2011-02-27 Thread Shoubhik
ngth you have to allocate n+1 > length array. > > On 27 February 2011 17:37, Shoubhik wrote: > > > THanks it worked !  :) > > > On Feb 27, 5:01 pm, "Shahansad K.P" wrote: > > > you have to mark the end of the string. > > > try char s[3][4]={"

[gcj] Re: Strings in C

2011-02-27 Thread Shoubhik
http://codepad.org/U6XDKsV5 check out the code plz.. I'm getting garbage ! On Feb 27, 5:14 pm, Shoubhik wrote: > yeah.. i got it, I was expecting it to be taken as default ( I feel so > silly   :) ) > > On Feb 27, 5:12 pm, "Shahansad K.P" wrote: > > > >

[gcj] Re: Strings in C

2011-02-27 Thread Shoubhik
http://codepad.org/OpqOhxkZ this could be a sample code to test call by ref... On Feb 27, 5:15 pm, Shoubhik wrote: > http://codepad.org/U6XDKsV5 > > check out the code plz.. I'm getting garbage ! > > On Feb 27, 5:14 pm, Shoubhik wrote: > > > > > > >

[gcj] Re: Strings in C

2011-02-27 Thread Shoubhik
oh.. i got it.. ! On Feb 27, 5:26 pm, Shoubhik wrote: > http://codepad.org/OpqOhxkZ > > this could be a sample code to test call  by ref... > > On Feb 27, 5:15 pm, Shoubhik wrote: > > >http://codepad.org/U6XDKsV5 > > > check out the code plz.. I'm gett

[gcj] SEGFAULT :(

2011-02-27 Thread Shoubhik
https://ideone.com/HkUYy the above code runs fine in my compiler ( gcc ) but segfaults in the online compiler. Please help. Whats wrong with my code? -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to goo

[gcj] PERMUTATIONS

2011-05-08 Thread Shoubhik
Could somebody post an algorithm/code for obtaining permutations of an n-letter string . -- You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-code@googlegroups.com. To unsubscribe from this group, send em

[gcj] Re: Google Code Jam Tools Website

2011-05-08 Thread Shoubhik
Hello Ahmed, Wonderful job :) Could you please tell me how did you automate the task of getting all the data ? ( and using it in your site ) Thanks in advance. On May 2, 3:13 pm, Ahmed Aly wrote: > Hi everyone, > > I would like to announce about my new Google Code Jam tools website, you can

[gcj] Re: Google Code Jam Tools Website

2011-05-08 Thread Shoubhik
is over., and thanks for your feedback. :) > > *@Shoubhik:* I used this > pagehttp://code.google.com/codejam/contest/scoreboard/do?cmd=GetScoreboar... > get all what I need, as you see there are 2 important parameters in > the > URL, the contest ID and the starting position (this position

[gcj] Re: Matlab in qualification round

2011-05-11 Thread Shoubhik
I've used Matlab for Control Systems [ Electrical ] to determine stability of systems. :-) No wonder, Matlab is excellent for mathematics ! On May 11, 9:39 am, Jin Mingjian wrote: > no big problem, I think.  If you do not use the recent features(like nested > function, new OOP...In fact, thes

[gcj] Behaviour of non-const int pointer on a const int

2012-01-01 Thread Shoubhik
int main() { int const sum=100; int *p=∑ *p=101; printf("%d, %d",*p,sum); return 0; } /* output 101, 101 */ p points to a constant integer variable, then why/how does *p manage to change the value of sum? -- You received this message because you ar

[gcj] sizeof(c) and size('a') gives different result . ( c is character variable)

2012-01-01 Thread Shoubhik
#include int main() { char ch; fflush(stdin); ch=getchar(); printf("ch= %d a=%d char=%d", sizeof(ch),sizeof('a'),sizeof(char)); } I type in 'a' (without quotes) as input , and the output I got in my ***gcc version 4.5.1*** is : c