Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Dwite Oct 2011 Q1
Index -> CompSci.ca, Contests -> DWITE
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Dan




PostPosted: Wed Oct 26, 2011 7:52 pm   Post subject: Re: RE:Dwite Oct 2011 Q1

Cyril @ 26th October 2011, 7:50 pm wrote:

Dan, is there any way to standardize new lines to '\n'?


Yes but that just casues the same issue for a diffrent group of peoleop who are assuming the line break is CR+LF.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Sponsor
Sponsor
Sponsor
sponsor
A.J




PostPosted: Wed Oct 26, 2011 7:55 pm   Post subject: RE:Dwite Oct 2011 Q1

I am sorry about #3. I was feeling in a particularly bad mood when I wrote up the problem set for this round. Though I really enjoyed the story (inspired by Maarij Baig, a friend of mine). I'll be releasing solutions/analyses tomorrow.
jli1




PostPosted: Wed Oct 26, 2011 7:56 pm   Post subject: Re: Dwite Oct 2011 Q1

Yeah, just tested with the posted input file and it seems to work fine with my compiler. I thought the string and stream libraries were pretty standard, its weird that getline behaviour would vary among compilers.
d310




PostPosted: Wed Oct 26, 2011 7:57 pm   Post subject: Re: Dwite Oct 2011 Q1

Well, many people on other online judges have had the same problem.
Perhaps in the future unix newlines for test data?
Cyril




PostPosted: Wed Oct 26, 2011 8:00 pm   Post subject: RE:Dwite Oct 2011 Q1

Can we try the gcc compiler suite from MinGW? I've always used g++ from that, and I've never had issues with newlines.
Dan




PostPosted: Wed Oct 26, 2011 8:01 pm   Post subject: Re: Dwite Oct 2011 Q1

d310 @ 26th October 2011, 7:57 pm wrote:
Perhaps in the future unix newlines for test data?


I fear that might just cause this issue for a new group of peoleop.

I wonder if it has to do with g++ being complied for cygwin.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
jli1




PostPosted: Wed Oct 26, 2011 8:06 pm   Post subject: Re: RE:Dwite Oct 2011 Q1

Cyril @ Wed Oct 26, 2011 8:00 pm wrote:
Can we try the gcc compiler suite from MinGW? I've always used g++ from that, and I've never had issues with newlines.


+1, (obviously) if the judge is on Windows
Dan




PostPosted: Wed Oct 26, 2011 8:10 pm   Post subject: RE:Dwite Oct 2011 Q1

Tony came up with a soultion to link in textmode.o which forces g++ to open everything in textmode. It seems to work on the tests i did on the judge but it might be worth while investaging the use of MinGW.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
md




PostPosted: Wed Oct 26, 2011 8:36 pm   Post subject: Re: Dwite Oct 2011 Q1

Dan @ 2011-10-26, 8:01 pm wrote:
d310 @ 26th October 2011, 7:57 pm wrote:
Perhaps in the future unix newlines for test data?


I fear that might just cause this issue for a new group of peoleop.

I wonder if it has to do with g++ being complied for cygwin.


By default cygwin uses *nix line endings (\n only), there is a way of setting it to use windows line endings though. Alas I don't remember what it is.
Display posts from previous:   
   Index -> CompSci.ca, Contests -> DWITE
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 24 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: