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 1732. Ministry of Truth

what is the test #3???
Posted by Ras Misha [t4ce] 1 Nov 2009 17:26
Re: what is the test #3???
Posted by RedRick [TSOGU] 1 Nov 2009 17:51
this input help me pass test #3

lossiblossible
lossible

answ:
______lossible
Re: what is the test #3???
Posted by DM^Dude (Kherson State University) 1 Nov 2009 21:44
Thanks, this test help me too))), but now i have TLE on test5
TL5
Posted by RedRick [TSOGU] 2 Nov 2009 09:24
I use hash, but I have TL#5 too, how I can pass this test? help me.
Re: TL5
Posted by RedRick [TSOGU] 2 Nov 2009 18:12
Yes! finally I got AC =)
may it help somebody:
look attentively on this code

for (int i = 0;i<strlen(s);i++)
{
...
}

and this

int l = strlen(s);
for (int i = 0;i<l;i++)
{
...
}

Edited by author 02.11.2009 18:12

Edited by author 02.11.2009 18:14
Re: what is the test #3???
Posted by batka 17 Nov 2009 21:31
are you sure this is test 3 ?
perhaps i can't really understand the description because it works just fine but it always breaks on test 3...
can someone help with these intervals or... i don't know give some tests to try
Re: what is the test #3???
Posted by Igor9669 18 Nov 2009 12:26
abcx abcxx abcxx
abc abcx abc x
Re: what is the test #3???
Posted by sos1g3 [TSOGU] 21 Nov 2009 12:32
My programm gives answ "I HAVE FAILED!!!" for test

abcx abcxx abcxx
abc abcx abc x

Is it rigth answer???
Re: what is the test #3???
Posted by sos1g3 [TSOGU] 21 Nov 2009 12:39
sorry.i found my mistake.Now i have wa7
Re: what is the test #3???
Posted by Igor9669 21 Nov 2009 17:52
And what is now your answer for a test?
And check may be you put a trailling space at the end...
Re: what is the test #3???
Posted by Lucas Lustosa Madureira 5 Mar 2016 04:00
Why the answer for the input

lossiblossible
lossible

is ______lossible instead of lossibl______e ?

Edited by author 05.03.2016 04:02

Edited by author 05.03.2016 04:03
Re: what is the test #3???
Posted by Alexandr Vasilyev 20 Jun 2016 20:16
s = input()
sl = input().split()
result = ''
_delete = lambda ls: ''.join({' ': ' '}.get(lc, '_') for lc in ls)


def delete(ls):
    global s, result
    try:
        pos = s.index(ls)
    except:
        print('I HAVE FAILED!!!')
        exit()
    result += _delete(s[:pos])
    s = s[pos:]
    result += ls
    s = s[len(ls):]
is_first = True
for ls in sl:
    if is_first:
        is_first = False
    else:
        delete(' ')
    delete(ls)
print(result+_delete(s))
It's WA3 too

Edited by author 20.06.2016 20:58
Re: what is the test #3???
Posted by Alexandr Vasilyev 20 Jun 2016 20:59
Lucas Lustosa Madureira, No.

Edited by author 20.06.2016 20:59