799 - Safari Holiday
Moderator: Board moderators
799 - Safari Holiday
What should I output for n=1?
Should I observe English grammar?
Should I observe English grammar?
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
I thought this was a relatively easy looking question, involving finding possible solutions to two simple mod equations however I have ended up trying to look for the existence of an (n,k,1)-design and have two mod equations, one inequality (fishers inequality) and a headache.... am I on the right lines with this question, it is about the existence of certain designs like steiner triple systems ?
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
Two simple mod equations sounds good. But I can't understand the other things you are speaking of. I simply tried to find some k that
(... two mod equations)
spoiler deleted
(... two mod equations)
spoiler deleted

Last edited by Adrian Kuegel on Wed May 12, 2004 10:35 pm, edited 1 time in total.
Yes...... I am ac now, I guess I was trying to make this too difficult however it seems to me that these conditions are not sufficient for the existence of a solution and it is a much deeper problem than that. See 'the 15 schoolgirls problem' by Thomas Kirkman which is essentially the problem presented here. It appears to me that any solution to this question forms what is known as a (v,k,1)-design however the existence of solutions for given v and k (or n and k as in 799) is not a simple question to answer and the two mods do not appear to be sufficient conditions - sure you can find a k which solves the mods but does this guarantee some possible solution exists ? In fact http://www.designtheory.org/library/enc ... cs/pbd.pdf states that there can be exceptions to this.
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
Hi there!
First, this is the problem where I have obtained more WA and RE.
I'm really desperate.
I describe my algorithm here:
I think that the problem is that exists in the problem input some case where combinations_n_elements_k_at_time is really big.
Now the questions:
Is my algorithm correct?
If someone have used the same algorithm, Could say me how have he/she solved the trouble with combinations?
Any hint about another algorithm is welcome.
Thanks!
First, this is the problem where I have obtained more WA and RE.
I'm really desperate.
I describe my algorithm here:
Code: Select all
for each case
if kmax >= n => solution found, next case;
for k=kmax to 2
if n mod k == 0
if combinations_n_elements_k_at_time mod (n/k) == 0 => solution found, next case;
No solution, next case;
Now the questions:
Is my algorithm correct?
If someone have used the same algorithm, Could say me how have he/she solved the trouble with combinations?
Any hint about another algorithm is welcome.
Thanks!
I've got WA and I'm not see the what is wrong in my solution!
Can Somebody help me?

Can Somebody help me?
Code: Select all
Remove, I've got AC now!

http://acm.uva.es/problemset/usersnew.php?user=47903
All men are like grass,and all their
glory is like the flowers of the field;
the grass withers and the flowers fall,
but the word of the Lord stands forever.
[1 Peter 1:24-25]
All men are like grass,and all their
glory is like the flowers of the field;
the grass withers and the flowers fall,
but the word of the Lord stands forever.
[1 Peter 1:24-25]
-
- New poster
- Posts: 39
- Joined: Mon Dec 04, 2006 2:18 pm
- Location: Bangladesh(CSE DU)
- Contact: