3 0
a
b
c
5 4
a
b
c
d
e
b a
c a
b c
c b
4 4
a
b
c
d
a b
b c
c a
d b
2 2
a
b
a b
b a
9 10
a
b
c
d
e
f
g
h
i
b a
c b
d c
e d
c e
f e
g f
e g
a h
i c
0 0
10685 - Nature
Moderator: Board moderators
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
10685 - Nature
I'm not sure what "the largest chain" means here since there may be cycles in the input. What is the right answer for those cases?
Last edited by Krzysztof Duleba on Sun Aug 08, 2004 2:34 pm, edited 1 time in total.
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm
-
- New poster
- Posts: 9
- Joined: Fri Feb 20, 2004 6:48 am
- Location: India
- Contact:
Wrong problem number
Just a small mistake.
The title of the post is 10865 instead of 10685
The title of the post is 10865 instead of 10685
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
So the prob 10865 wasn't used yet? Gosh, I spoiled it. I should never again use my local base of all problems instead of official website.
Of cource now I have to write to 10865's author about it that his problem will be erased and replaced by something else.
I looked at 10685 too and using your advice to forget about graphs, I got AC. Thanks
Of cource now I have to write to 10865's author about it that his problem will be erased and replaced by something else.
I looked at 10685 too and using your advice to forget about graphs, I got AC. Thanks
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
Can anyone please tell me why the code is getting TLE? I used the same code for "10608 friends".
Please help me. getting TLE 3 times. How to improve or is there any silly mistake?
Here is the code...
Code: Select all
removed after ac
Last edited by anupam on Sun Aug 08, 2004 10:01 pm, edited 1 time in total.
"Everything should be made simple, but not always simpler"
And also, what's about the time limit? TIME LIMIT IN THE PROB. STS is 40 seconds. But TLE in 10 sec?
What I got after accepted is that, In pure C you can use binary search, mapping. By using STL and MAP you can get accepted in a very short time.
What I got after accepted is that, In pure C you can use binary search, mapping. By using STL and MAP you can get accepted in a very short time.
Last edited by anupam on Wed Aug 11, 2004 10:01 am, edited 3 times in total.
"Everything should be made simple, but not always simpler"