11058 - Encoding
Moderator: Board moderators
-
- New poster
- Posts: 12
- Joined: Wed Oct 13, 2004 10:14 am
- Location: Teh
- Contact:
11058 - Encoding
can any body give i/o for this problem.I got WA
-
- Experienced poster
- Posts: 111
- Joined: Mon Jan 09, 2006 6:19 pm
- Location: Tehran, Iran
- Contact:
Re: 11058 : Encoding
hi dear ashkan ,Ashkankhan wrote:can any body give i/o for this problem.I got WA
it's good to see you , i think this problem is so trivial , maybe you did a little mistake , and i am not so good in generating IO ( i wish i could ), but you can PM me your code , and i'll check it 4 u
yours
Arsalan
In being unlucky I have the record.
-
- A great helper
- Posts: 481
- Joined: Sun Jun 19, 2005 1:18 am
- Location: European Union (Slovak Republic)
Re: 11058 : Encoding
I don't think this problem has any special cases... If you wish, just post your code here. Facing it some huge random inputs with outputs generated by AC could help to find the mistake.Ashkankhan wrote:can any body give i/o for this problem.I got WA
-
- New poster
- Posts: 12
- Joined: Wed Oct 13, 2004 10:14 am
- Location: Teh
- Contact:
Thanx
thanx Dear Arsalan.I got AC.
But is there faster algorithm for this problem?
But is there faster algorithm for this problem?
-
- A great helper
- Posts: 481
- Joined: Sun Jun 19, 2005 1:18 am
- Location: European Union (Slovak Republic)
Re: Thanx
In what sense a faster algorithm do you want? There is no asymptotically faster algorithm, as this one does not do much more than just reading the input. However, you can prune your input routines to read the input quicker, but this does not make your algorithm asymptotically faster.Ashkankhan wrote:thanx Dear Arsalan.I got AC.
But is there faster algorithm for this problem?
-
- Experienced poster
- Posts: 111
- Joined: Mon Jan 09, 2006 6:19 pm
- Location: Tehran, Iran
- Contact:
Re: Thanx
i don't think so , because this problem is so easy , it's a kind of simulation problem , and no need to think in order to solve it , but if you change your "cr" first dimension from 1005 to 100 ,and when you update the array up to strlen ( a ) instead of 1005, it would be fasterAshkankhan wrote:thanx Dear Arsalan.I got AC.
But is there faster algorithm for this problem?
yours
Arsalan
In being unlucky I have the record.
I/O
Greetings!
Anyone willing to post critical I/O?
I believe I'm missing something of the description of the problem
Or, at least, the ACed output for this input:
Anyone willing to post critical I/O?
I believe I'm missing something of the description of the problem
Or, at least, the ACed output for this input:
Code: Select all
ufrn
t
o
w
k
q
z
f
n
y
i
c
m
s
j
n
r
g
l
d
s
u
s
g
y
e
u
14
0 q t
0 j f
1 v d
1 r o
1 f d
1 r o
1 f a
2 e p
2 r w
2 v e
2 f x
3 y p
3 t m
3 u k
_.
This is my output for your input:
This is the only one I got in one try, I was surprised by it. I think the only thing that was close to being tricky was that you have to update your rule table every time there is a change (for all remaining steps, not just that one).
Code: Select all
Case #1: The encoding string is uawj.
Fast!
That's some pretty fast answer Darko!
Thanks a lot!
My output is wrong :S
Going to check why.
Thanks a lot!
My output is wrong :S
Going to check why.
_.
This problem looks simple, but with this code, I get RE.
Someone can explain me what's wrong?
The test case above gives correct result.
Someone can explain me what's wrong?
The test case above gives correct result.
Code: Select all
Now AC
Input buffer overflow, what a silly error!
Thanks Martin Macko
Last edited by ytsejam on Sat Aug 12, 2006 8:43 pm, edited 1 time in total.
I really don't know where is the mistake... Could anyone explain me?
Code: Select all
T every body!
Last edited by leocm on Thu Aug 17, 2006 6:49 pm, edited 1 time in total.
-
- Learning poster
- Posts: 56
- Joined: Tue Jun 13, 2006 5:18 pm
- Location: (CSE, SUST) Sylhet, Bangladesh
- Contact:
Why I am getting WA? Help plzzzzzzzz
I am getting WA with this code.
Here is my code:
Here is my code:
Code: Select all
Removed after AC
Last edited by Mushfiqur Rahman on Sat Mar 03, 2007 3:21 pm, edited 1 time in total.
-
- A great helper
- Posts: 481
- Joined: Sun Jun 19, 2005 1:18 am
- Location: European Union (Slovak Republic)
Not working for:leocm wrote:I really don't know where is the mistake... Could anyone explain me?
Code: Select all
aaaaaa
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
a
2
2 a b
4 a a
Code: Select all
Case #1: The encoding string is aabbaa.
-
- A great helper
- Posts: 481
- Joined: Sun Jun 19, 2005 1:18 am
- Location: European Union (Slovak Republic)
Re: Why I am getting WA? Help plzzzzzzzz
Not working for the same test case as I've just posted above.Mushfiqur Rahman wrote:I am getting WA with this code.
Here is my code: