10700  Camel trading
Moderator: Board moderators
10700  Camel trading
Sorry for putting this topic in volume CVI but at thismoment ther is not Volume CVII.
I don't know why i'm geting WA.My solution is good solution I use DP and get right answers for simple input.
I saw that nobody at this moment have got this problem AC by Pascal.
Whats wrong.
I don't know why i'm geting WA.My solution is good solution I use DP and get right answers for simple input.
I saw that nobody at this moment have got this problem AC by Pascal.
Whats wrong.
someone who like to solve informatic problems.
http://acm.uva.es/cgibin/OnlineJudge?AuthorInfo:29650
http://acm.uva.es/cgibin/OnlineJudge?AuthorInfo:29650

 Guru
 Posts: 1080
 Joined: Thu Dec 19, 2002 7:37 pm
Well, I just got accepted in Pascal (with my alter ego account xenon, else it wouldn't show up in the list ), so there shouln't be any problem.
You can use DP, but, as Per stated somewhere, there also is a greedy approach which is a lot faster. And like him, I'm also not 100% convinced that it works for all special cases. But hey, AC is AC.
You can use DP, but, as Per stated somewhere, there also is a greedy approach which is a lot faster. And like him, I'm also not 100% convinced that it works for all special cases. But hey, AC is AC.
Hello little joey If you got AC by Pascal then tell me please did you use Longint or something else int64,qword..?
someone who like to solve informatic problems.
http://acm.uva.es/cgibin/OnlineJudge?AuthorInfo:29650
http://acm.uva.es/cgibin/OnlineJudge?AuthorInfo:29650

 Guru
 Posts: 1080
 Joined: Thu Dec 19, 2002 7:37 pm
Pascal.
Greetings all!
I solved this one in Pascal too.
I used QWord.
I made it in a pretty mechanical way
A couple of arrays of strings, and such.
Got time 0:00.598, but ACed
Keep posting!
I solved this one in Pascal too.
I used QWord.
I made it in a pretty mechanical way
A couple of arrays of strings, and such.
Got time 0:00.598, but ACed
Keep posting!
_.
Re: problem with 10700
Did you define infinity correctly? That was my problem.Eduard wrote:I don't know why i'm geting WA.My solution is good solution I use DP and get right answers for simple input.
I saw that nobody at this moment have got this problem AC by Pascal.
Whats wrong.
[c]
AC
[/c]
EDIT:
To anyone else who may have the same stupid problem I did. The string I used to hold the expression was a char array of size 24 (at most 12 numbers, at most 11 operators, plus the '\0'). However, I forgot that some numbers could be 2 digits, which means the array size should have been at least 36
AC
[/c]
EDIT:
To anyone else who may have the same stupid problem I did. The string I used to hold the expression was a char array of size 24 (at most 12 numbers, at most 11 operators, plus the '\0'). However, I forgot that some numbers could be 2 digits, which means the array size should have been at least 36
Examiner was right i made the infinity wrong because i write it for longint and infinity=maxlongint.Now I chang infinity=5*10^15 and got AC.
someone who like to solve informatic problems.
http://acm.uva.es/cgibin/OnlineJudge?AuthorInfo:29650
http://acm.uva.es/cgibin/OnlineJudge?AuthorInfo:29650