Search found 293 matches

by chunyi81
Sun Dec 31, 2006 12:13 pm
Forum: Bugs and suggestions
Topic: 444 - Encoder and Decoder - PE Issue
Replies: 4
Views: 2609

444 - Encoder and Decoder - PE Issue

See this thread: I had a PE for this problem 3 years ago which was never resolved, and now I am convinced that the judge output might not have a newline character after the last line of output. Shouldn't there be a newline character after the las...
by chunyi81
Mon Dec 25, 2006 8:03 am
Forum: Bugs and suggestions
Topic: 11100 - OJ accepts incorrect solutions
Replies: 4
Views: 3472

Did you notice the yellow tick before the problem? This means that there can be more than one possible correct minimum sequence.

Now please remove your ACed code as it is a spoiler.
by chunyi81
Sat Dec 23, 2006 8:41 am
Forum: Bugs and suggestions
Topic: 483 - Word Scramble PE issue
Replies: 6
Views: 3030

I am also having a problem with this problem as well. Add to that problems 444 and 445, though my 445 code has been rejudged to be AC, I believe problem 444 also has judge data where the output does not end with a newline.
by chunyi81
Thu Dec 21, 2006 4:50 pm
Forum: Volume 4 (400-499)
Topic: 444 - Encoder and Decoder
Replies: 155
Views: 22580

A reply after more than 3 years. However please check the bug and suggestions forum regarding problem 445. Thanks for the input for problem 444. I will check it out when I have time.
by chunyi81
Thu Dec 14, 2006 5:37 pm
Forum: Bugs and suggestions
Topic: link to problem statement in stats
Replies: 8
Views: 2391

One other thing to add. I am seeing the best CPU for all the problems I have solved as 2.453s. Is that a bug or something?
by chunyi81
Sun Sep 10, 2006 8:12 am
Forum: Volume 4 (400-499)
Topic: 496 - Simply Subsets
Replies: 48
Views: 9468

I am certain that judge data for this problem does not have sets that have repetition of elements as my AC code does not take care of that.

Also, I think Theorem is right. Have a look at these two articles:
by chunyi81
Sat Sep 02, 2006 7:26 am
Forum: Volume 1 (100-199)
Topic: 102 - Ecological Bin Packing
Replies: 485
Views: 52523

Why are you reading from a file? You should be reading input using cin or scanf for C++ code.
by chunyi81
Sun Aug 06, 2006 5:08 pm
Forum: C++
Topic: compile error, why?
Replies: 9
Views: 3329

You can use sqrt(3.0).

For your second question, I don't get your question. Could you rephrase? Thanks.
by chunyi81
Sun Aug 06, 2006 6:16 am
Forum: C++
Topic: compile error, why?
Replies: 9
Views: 3329

For the first code, other than the problem spotted by the previous poster, this line of code also has a problem: cout <<setprecision(3)<<fixed<<showpoint; iomanip library is not well supported by the g++ compiler in the OJ. Change to this instead: cout << setprecision(3); cout.setf(ios::fixed | ios:...
by chunyi81
Sun Jul 30, 2006 8:26 am
Forum: Volume 4 (400-499)
Topic: 423 - MPI Maelstrom
Replies: 17
Views: 9733

Re: I need some IO :)

Hi, I 've implemented dijkstra algo. with binary heap and want to check whether it produces correct answer... so, I try 423 and get WA :( I need some tricky IO on this problem... thanks. [EDIT] My implementation of Dijkstra is okay, it was a silly mistake on the input part. :oops: , AC now :D I use...
by chunyi81
Sat Jul 22, 2006 4:47 am
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 47354

#include <cstdlib> instead of <cmath>
by chunyi81
Wed Jul 05, 2006 3:23 pm
Forum: Java
Topic: JAVA-Difficulties We Face
Replies: 31
Views: 26594

...and another one: AC st = new StringTokenizer(readLine()); String s = st.nextToken(); int val = parseInt(st.nextToken()); list.put(s, new Integer(val)); WA st = new StringTokenizer(readLine()); list.put(st.nextToken(), new Integer(parseInt(st.nextToken()))); It's not even a case of multiple deref...
by chunyi81
Sat Jul 01, 2006 4:33 am
Forum: Volume 4 (400-499)
Topic: 492 - Pig-Latin
Replies: 213
Views: 26693

The posted code above is fine. My AC code uses a char array of 1200000 characters and iterates through each character. However, check this: for(i=0;i<strlen(kata);i++) You are calling strlen for each iteration of the loop. Of course you will get TLE this way. Try something like this: int len = strle...
by chunyi81
Sun Jun 25, 2006 6:03 am
Forum: Off topic (General chit-chat)
Topic: Who will win the World Cup?
Replies: 53
Views: 128665

Intersting numorology! Road to final for Brazil looks easy. The only ever champions that they meet before final are England and France. They're the only one time winner and they won't likely pose much threat to team like Brazil that played against Japan. Argentina and Jermany meet in quarter-finals...
by chunyi81
Sat Jun 24, 2006 11:54 am
Forum: C++
Topic: getline after cin>>
Replies: 3
Views: 3210

Hmmm... I have not used cin.ignore before. May I suggest an alternative? How about using two getlines? You can also use getline this way:


where str is a C++ string.

One to read in the newline after the cin >> and the second one to read in the line you want.

Go to advanced search