649 You who?
I was trying to understand this problem but seemed to have some difficulties.
My understanding of the problem is as below:
Given a graph G, divide its vertices into two groups such that
1) the number of vertices in two group differ by at most 1
2) the maximum number of not-acquainted classmates for a person in a single group is minimized.
Am I understanind it wrong?
since in the output for
1 2 3 4
2 2 3 4
3 2 1 2
4 2 1 2
is
1 4 1 2 3 4
then I got two question:
1) I thought we are supposed to divide the class in two, but in the output there is only one assignment for a single class.
(or does it means that we only ouput the enrollment for one of the two)
2) also in the problem it states: the difference in the sizes of the classes is at most one. But in the output configuration I cannot see how the above rule is satisfied..
I'm sorry if I misunderstand the question completely,
but please some help in clarification is appreciated..
649 - You Who?
Moderator: Board moderators
-
- New poster
- Posts: 6
- Joined: Fri Feb 01, 2008 4:46 pm
- Location: Taiwan
Re: 649 - You Who?
Can anyone who solved this problem help me out ?
1) What should the output be when N = 1 ?
2) What does maximal number per person mean? Is it
(I1+I2) /N
or
max (I1/N1 , I2/N2) N1 + N2 = N, I1 = introductions in Set 1 and I2 = Introductions in Set 2
Any help is appreciated.
1) What should the output be when N = 1 ?
2) What does maximal number per person mean? Is it
(I1+I2) /N
or
max (I1/N1 , I2/N2) N1 + N2 = N, I1 = introductions in Set 1 and I2 = Introductions in Set 2
Any help is appreciated.
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 649 - You Who?
For Input:
My AC output is:
This output should also work:
The best assignment has the minimum maximum number of introductions. The teachers want to wait as little as possible for all of the introductions to be completed. There is no division or average. Minimize the maximum of any student.
Code: Select all
1
1 0
Code: Select all
0
0
1 1
Code: Select all
0
1 1
0
Check input and AC output for thousands of problems on uDebug!
Re: 649 - You Who?
Can you give your output for the following input
My code gives the below output. But I am getting WA.
Code: Select all
6
1 3 4 5 6
2 3 4 5 6
3 3 4 5 6
4 3 1 2 3
5 3 1 2 3
6 3 1 2 3
1
1 0
2
1 1 2
2 1 1
7
1 2 3 4
2 2 5 6
3 2 1 7
4 2 1 5
5 2 2 4
6 1 2
7 1 3
Code: Select all
1
3 3 5 6
3 1 2 4
0
0
1 1
0
1 2
1 1
2
4 2 3 6 7
3 1 4 5
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 649 - You Who?
Your output looks correct.
Check input and AC output for thousands of problems on uDebug!