Re: what is the test #3???
this input help me pass test #3
lossiblossible
lossible
answ:
______lossible
Re: what is the test #3???
Thanks, this test help me too))), but now i have TLE on test5
TL5
I use hash, but I have TL#5 too, how I can pass this test? help me.
Re: TL5
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???
Послано
batka 17 ноя 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???
abcx abcxx abcxx
abc abcx abc x
Re: what is the test #3???
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???
sorry.i found my mistake.Now i have wa7
Re: what is the test #3???
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???
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???
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???
Lucas Lustosa Madureira, No.
Edited by author 20.06.2016 20:59