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 1177. Like Comparisons

I still got WA :'( is '^
Posted by AOY++ 26 Feb 2002 17:22
question
Posted by AOY++ 26 Feb 2002 17:24
what is the answer for this testcase:
==============
3
'^' like '[^]'
'%' like '[%[]]'
'[' like '[^]'
===============

please help me!

thanks a lot!
Re: question
Posted by Dinh Hong Minh 26 Feb 2002 20:32
All cases are "Yes" , right ?

> what is the answer for this testcase:
> ==============
> 3
> '^' like '[^]'      YES
> '%' like '[%[]]'    YES
> '[' like '[^]'      YES
> ===============
>
> please help me!
>
> thanks a lot!
I think the last one should be 'NO'.
Posted by Han Wentao 27 Feb 2002 16:40
> All cases are "Yes" , right ?
>
> > what is the answer for this testcase:
> > ==============
> > 3
> > '^' like '[^]'      YES
> > '%' like '[%[]]'    YES
> > '[' like '[^]'      YES
> > ===============
> >
> > please help me!
> >
> > thanks a lot!
>
>
Re: I think the last one should be 'NO'.
Posted by Denis Koshman 20 Aug 2008 16:16
1st and 3rd test are invalid, there are no [] and [^] (sub)templates
2nd test should be NO - it is interpreted as "% or [" followed by "]". I.e. the following tests are both YES:

'%]' like '[%[]]'
'[]' like '[%[]]'

Edited by author 20.08.2008 16:17