ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1027. D++ Again

(*)should be thought as 'YES'!
Posted by bottles 14 Feb 2008 10:36
why it is wrong?

"An arithmetic expression in D++ is always opened by "(", is closed by ")" and may contain any of the following symbols: "=+-*/0123456789)(""

arithmetic expression is opened by '(',may contain '*'and closed by ')'.so "(*)" can seen as a right  arithmetic expression.

anyone can answer me??
Re: (*)should be thought as 'YES'!
Posted by Anisimov Dmitry 22 Apr 2008 19:58
my AC'ed solution says that (*) is NOT a legal expression.
Either the test set does not have such things, or judges do not consider (*) to be an arithmetic expr
Re: (*)should be thought as 'YES'!
Posted by Mansurov Artur 23 Jul 2008 16:14
(*) is NOT valid!
Re: (*)should be thought as 'YES'!
Posted by h1ci 18 Jun 2009 19:35
An arithmetic expression can't start with a pair of symbols "(*"
Re: (*)should be thought as 'YES'!
Posted by 2rf [Perm School #9] 16 Feb 2010 13:47
In my opinion, (*) is valid COMMENTARY - it's opened by (* and closed by *) ; I think we need to add "and these two pairs of symbols should not intersect" to this phrase in statement - " A comment is always opened by a pair of symbols "(*" and is closed by a pair of symbols "*)" , otherwise (*) is YES for sure.

Edited by author 16.02.2010 13:52
Re: (*)should be thought as 'YES'!
Posted by unlucky [Vologda SPU] 16 Feb 2010 21:08
2rf [Perm School #9] wrote 16 February 2010 13:47
In my opinion, (*) is valid COMMENTARY - it's opened by (* and closed by *) ; I think we need to add "and these two pairs of symbols should not intersect" to this phrase in statement - " A comment is always opened by a pair of symbols "(*" and is closed by a pair of symbols "*)" , otherwise (*) is YES for sure.
You is very crazy man :)
I think, that you never write syntax analyzer for languages.
You "additional condition"  is obvious for all, that ever write syntax analyzers, but not for you. :)
This problem is about syntax analyzer , NOT working with any string and substrings.


Edited by author 16.02.2010 21:12