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

Ras Misha [t4ce] what is the test #3??? [12] // Problem 1732. Ministry of Truth 1 Nov 2009 17:26
RedRick [TSOGU] Re: what is the test #3??? [11] // Problem 1732. Ministry of Truth 1 Nov 2009 17:51
this input help me pass test #3

lossiblossible
lossible

answ:
______lossible
DM^Dude (Kherson State University) Re: what is the test #3??? [2] // Problem 1732. Ministry of Truth 1 Nov 2009 21:44
Thanks, this test help me too))), but now i have TLE on test5
RedRick [TSOGU] TL5 [1] // Problem 1732. Ministry of Truth 2 Nov 2009 09:24
I use hash, but I have TL#5 too, how I can pass this test? help me.
RedRick [TSOGU] Re: TL5 // Problem 1732. Ministry of Truth 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
batka Re: what is the test #3??? [4] // Problem 1732. Ministry of Truth 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
Igor9669 Re: what is the test #3??? [3] // Problem 1732. Ministry of Truth 18 Nov 2009 12:26
abcx abcxx abcxx
abc abcx abc x
sos1g3 [TSOGU] Re: what is the test #3??? [2] // Problem 1732. Ministry of Truth 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???
sos1g3 [TSOGU] Re: what is the test #3??? [1] // Problem 1732. Ministry of Truth 21 Nov 2009 12:39
sorry.i found my mistake.Now i have wa7
Igor9669 Re: what is the test #3??? // Problem 1732. Ministry of Truth 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...
Lucas Lustosa Madureira Re: what is the test #3??? [1] // Problem 1732. Ministry of Truth 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
Alexandr Vasilyev Re: what is the test #3??? // Problem 1732. Ministry of Truth 20 Jun 2016 20:59
Lucas Lustosa Madureira, No.

Edited by author 20.06.2016 20:59
Alexandr Vasilyev Re: what is the test #3??? // Problem 1732. Ministry of Truth 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