Search found 80 matches

by jjtse
Mon Dec 17, 2007 6:30 am
Forum: Volume 113 (11300-11399)
Topic: 11308 - Bankrupt Baker
Replies: 17
Views: 7439

WA

Can anyone tell me what's wrong with my code? It gets WA. I handled the potential integer overflow problem with unsigned long long. I concatenated the [cost,recipe] to represent the cost of each recipe. Then I sorted it using qsort. I believe this handles the lexicographical order. Any ideas? Here's...
by jjtse
Fri Dec 14, 2007 10:07 pm
Forum: Volume 112 (11200-11299)
Topic: 11234 - Expressions
Replies: 15
Views: 7188

Time Limited Exceeded (TLE)

Does anyone know more ways to optimize this code? I already optimized my queue usage. I'm suspecting I can do my string concatenations faster, but I don't know how to do it. Any ideas how I can get this faster? Here's the code: #include <iostream> #include <string> //11234.cpp using namespace std; i...
by jjtse
Tue Dec 04, 2007 9:02 am
Forum: Volume 4 (400-499)
Topic: 498 - Polly the Polynomial
Replies: 73
Views: 13463

Does anyone know if there's a limit on 'n' and 'm'?
by jjtse
Mon Dec 03, 2007 3:08 am
Forum: Volume 112 (11200-11299)
Topic: 11225 - Tarot scores.
Replies: 9
Views: 4480

traditionally, that extra blank line should've showed up as a presentation error. I guess this new judging system doesn't work the same way.
by jjtse
Sun Dec 02, 2007 9:42 am
Forum: Volume 112 (11200-11299)
Topic: 11225 - Tarot scores.
Replies: 9
Views: 4480

Silly mistake

Likewise, I bet I have a silly mistake in here somewhere. I've been pulling my hair out trying to find out what it is. Anyone got any ideas?


note:
Since the score is always an integer, I avoided the use of doubles/floats

Code: Select all

 code deleted 
by jjtse
Tue Oct 23, 2007 5:56 am
Forum: Volume 1 (100-199)
Topic: 119 - Greedy Gift Givers
Replies: 145
Views: 25374

Thanks! That did the trick
by jjtse
Tue Oct 23, 2007 5:41 am
Forum: FAQ
Topic: e-mail problem
Replies: 0
Views: 4354

e-mail problem

In the old system, they used to e-mail the error message on compile errors. Now with this new system, they don't do that and there's no way to find out what's wrong with your code if you have a compile error on the judges' system but not on your own system.
by jjtse
Tue Oct 23, 2007 5:31 am
Forum: Volume 1 (100-199)
Topic: 119 - Greedy Gift Givers
Replies: 145
Views: 25374

Compile Error

Does anyone know why this gives a compile error? I compile by: g++ filename.cpp it works fine on my own pc, but it has a newer compiler. Does anyone know how to compile down to older versions? Thanks. #include <iostream> #include <string> using namespace std; string line; char num[100][100]; int ans...
by jjtse
Thu Oct 18, 2007 4:58 pm
Forum: Volume 4 (400-499)
Topic: 490 - Rotating Sentences
Replies: 212
Views: 19949

Thanks! I got ACCEPTED.
by jjtse
Sat Oct 13, 2007 10:56 am
Forum: Volume 4 (400-499)
Topic: 490 - Rotating Sentences
Replies: 212
Views: 19949

can someone double check this?

It handles the above input cases exactly and it still gives me presentation error. My current program outputs a newline at the end of output. Weird thing is, if I remove that last newline at the end of the output, it'll say wrong answer. #include <iostream> using namespace std; string str [101]; voi...
by jjtse
Wed Nov 01, 2006 10:05 am
Forum: Volume 6 (600-699)
Topic: 616 - Coconuts, Revisited
Replies: 37
Views: 11659

ram wrote:"long int" is not sufficient for longer values.

Try using "long double" instead of "long int" and "fmod" instead of "%".

Why would that even be an issue? The problem clearly says "integers" as coconuts
by jjtse
Wed Nov 01, 2006 9:55 am
Forum: Volume 6 (600-699)
Topic: 616 - Coconuts, Revisited
Replies: 37
Views: 11659

Hi,

I'm wondering if someone can give some more sample inputs/output for this problem. I think my program is pretty good except maybe a few special cases.


Thanks
by jjtse
Wed Nov 01, 2006 9:45 am
Forum: Volume 6 (600-699)
Topic: 616 - Coconuts, Revisited
Replies: 37
Views: 11659

are you sure there is no solution for this case?


65539


My program output says 2 people and 1 monkey.


My program is not AC
by jjtse
Mon Oct 23, 2006 8:15 pm
Forum: Volume 4 (400-499)
Topic: 402 - M*A*S*H
Replies: 56
Views: 13416

Thanks. I already fixed it. It was indeed some other bug. So for future reference, it is safe to assume exactly 22 integers in one input line.
by jjtse
Mon Oct 23, 2006 6:00 am
Forum: Volume 4 (400-499)
Topic: 402 - M*A*S*H
Replies: 56
Views: 13416

In problem description says: The next 20 integers are the values of the first 20 cards in the deck. But that not true .... integers may be less .... Can someone verify this above statement? The problem specification says there will be "22" integers in a line. And that's what I'm assuming. If a line...

Go to advanced search