May Allah`s peace , mercy and blessing be upon you
P.S: This is not the original text, I rephrased and summarized the original one because I'm lazy and I couldn't type the whole text. if there is an error it's my mistake.
[D] SCPC:
We need to build a contest hall in the shape of a cuboid (3D rectangle). for economical reasons, we need to minimize the size (area) of the rectangle. So given the coordinates of the teams, calculate the minimum rectangle area of land for a building big enough to fit all the teams.
Input :
T: number of cases.
N: number of teams.
Xi Yi: coordinates of each team.
1<=T,N<=100,
-10000<=Xi,Yi<=10000
Output:
Single line starting with case number, followed by the area of the minimum rectangle rounded to 4 decimal places.
Example :
4
4
0 0
1 1
1 0
0 1
4
0 0
2 2
2 0
0 2
4
0 0
1 2
1 0
0 2
3
0 0
1 0
1 1
--->
Case 1: 1.0000
Case 2: 4.0000
Case 3: 2.0000
Case 4: 1.0000
Contest Analysis :
Showing posts with label mcpc2012. Show all posts
Showing posts with label mcpc2012. Show all posts
Friday, December 7, 2012
Wednesday, December 5, 2012
MCPC 2012 - Problem C : Shortest path in a grid
May Allah`s peace , mercy and blessing be upon you
P.S: This is not the original text, I rephrased and summarized the original one because I'm lazy and I couldn't type the whole text. if there is an error it's my mistake.
[C] LCPC:
Chief judge Fegla and Nicole are in a university and need to meet each other to smoke Shesha O_o' !!! the problem is that all the walkways in the campus form a rectangular grid that has some strange properties :
No one can walk elsewhere the cells of the grid.
Any person on a cell can only go the cell on his left, right, front, rear, the walk takes one second.
Person can't get out of the grid's boundaries.
If a tree is planted in a cell, no one can walk on this cell.
Fegla and Nicole are in two cells(not necessarily different and has no tree) they start looking for each other taking one action each second simultaneously, your job is to find the minimum number of seconds needed to meet.
Input :
T: number of cases.
R C: number of rows, number of columns.
r1 c1 r2 c2: Fegla's coordinates, Nicole's coordinates.
N: number of trees.
N lines : TRi TCi Tree i coordinates.
1<=R,C<=20, 0<=r1,r2<=R, 0<=c1,c2<=C,
0<=N<=R*C-2, 0<=TRi<=R, 0<=TCi<=C
Output:
Single line either the minimum number of seconds or -1 if they can never meet.
Example :
4
1 3
0 0 0 2
0
2 3
0 0 1 0
0
2 3
0 0 1 2
3
0 2
1 0
1 1
2 3
0 0 0 2
1
0 1
--->
1
1
-1
2
Contest Analysis :
P.S: This is not the original text, I rephrased and summarized the original one because I'm lazy and I couldn't type the whole text. if there is an error it's my mistake.
[C] LCPC:
Chief judge Fegla and Nicole are in a university and need to meet each other to smoke Shesha O_o' !!! the problem is that all the walkways in the campus form a rectangular grid that has some strange properties :
No one can walk elsewhere the cells of the grid.
Any person on a cell can only go the cell on his left, right, front, rear, the walk takes one second.
Person can't get out of the grid's boundaries.
If a tree is planted in a cell, no one can walk on this cell.
Fegla and Nicole are in two cells(not necessarily different and has no tree) they start looking for each other taking one action each second simultaneously, your job is to find the minimum number of seconds needed to meet.
Input :
T: number of cases.
R C: number of rows, number of columns.
r1 c1 r2 c2: Fegla's coordinates, Nicole's coordinates.
N: number of trees.
N lines : TRi TCi Tree i coordinates.
1<=R,C<=20, 0<=r1,r2<=R, 0<=c1,c2<=C,
0<=N<=R*C-2, 0<=TRi<=R, 0<=TCi<=C
Output:
Single line either the minimum number of seconds or -1 if they can never meet.
Example :
4
1 3
0 0 0 2
0
2 3
0 0 1 0
0
2 3
0 0 1 2
3
0 2
1 0
1 1
2 3
0 0 0 2
1
0 1
--->
1
1
-1
2
Contest Analysis :
Tuesday, December 4, 2012
MCPC 2012 - Problem B : Minimal and maximal rate
May Allah`s peace , mercy and blessing be upon you
P.S: This is not the original text, I rephrased and summarized the original one because I'm lazy and I couldn't type the whole text. if there is an error it's my mistake.
[B] JCPC:
Chief judge was hospitalized, he was kept in until a test (that returns a positive real number) dropped to 2.0 or less. Given the current result H and number of days D and provided that he is tested every hour and released immediately if result <= 2.0 print the minimum and maximum rate of decrease in this measurement to be released from the hospital after D days, but not after D+1 days.
1 day = 24 hours, very useful information !!!
Input :
T: number of cases.
T lines : H(current measurement) D(number of days)
1<=T<=200, 3<=H<=100, 1<=D<=150
Output:
Single line for each case in the following format : <maximum rate> <minimum rate> rounded to 5 decimal places after decimal point.
Example :
1
5 2
--->
0.06250 0.04225
Contest Analysis :
P.S: This is not the original text, I rephrased and summarized the original one because I'm lazy and I couldn't type the whole text. if there is an error it's my mistake.
[B] JCPC:
Chief judge was hospitalized, he was kept in until a test (that returns a positive real number) dropped to 2.0 or less. Given the current result H and number of days D and provided that he is tested every hour and released immediately if result <= 2.0 print the minimum and maximum rate of decrease in this measurement to be released from the hospital after D days, but not after D+1 days.
1 day = 24 hours, very useful information !!!
Input :
T: number of cases.
T lines : H(current measurement) D(number of days)
1<=T<=200, 3<=H<=100, 1<=D<=150
Output:
Single line for each case in the following format : <maximum rate> <minimum rate> rounded to 5 decimal places after decimal point.
Example :
1
5 2
--->
0.06250 0.04225
Contest Analysis :
Monday, December 3, 2012
MCPC 2012 - Problem A : Pattern matching
May Allah`s peace , mercy and blessing be upon you
P.S: This is not the original text, I rephrased and summarized the original one because I'm lazy and I couldn't type the whole text. if there is an error it's my mistake.
[A] ACPC:
One of your friends spilled coffee on a form, luckily it wasn't totally destroyed. You will tell him what the fields on his form say for him to fill. You are given all the fields in your form as two strings <label>: <info> and the given questions. Each question is a string that was originally a label in the form but got some of its letters covered by coffee.
Input :
N: number of labels.
N lines : <lable>: <info>
M: number of questions.
M lines: <question>
1<=N<=100, 1<=M<=100, M<=N
<label>,<info> : string of lowercase & uppercase English letters
<question> : string formed of lowercase & uppercase English letters and question mark '?'.
Output:
Single line for each question in the following format : <original label>: <original info> that contains the first matching label and the info that matches it.
Example :
4
Name: Amr Samir
Age: 21
University: Cairo Univ.
Smoker: no
2
?m????
??m?
--->
Smoker: no
Name: Amr Samir
Contest Analysis :
P.S: This is not the original text, I rephrased and summarized the original one because I'm lazy and I couldn't type the whole text. if there is an error it's my mistake.
[A] ACPC:
One of your friends spilled coffee on a form, luckily it wasn't totally destroyed. You will tell him what the fields on his form say for him to fill. You are given all the fields in your form as two strings <label>: <info> and the given questions. Each question is a string that was originally a label in the form but got some of its letters covered by coffee.
Input :
N: number of labels.
N lines : <lable>: <info>
M: number of questions.
M lines: <question>
1<=N<=100, 1<=M<=100, M<=N
<label>,<info> : string of lowercase & uppercase English letters
<question> : string formed of lowercase & uppercase English letters and question mark '?'.
Output:
Single line for each question in the following format : <original label>: <original info> that contains the first matching label and the info that matches it.
Example :
4
Name: Amr Samir
Age: 21
University: Cairo Univ.
Smoker: no
2
?m????
??m?
--->
Smoker: no
Name: Amr Samir
Contest Analysis :
MCPC 2012 Just Another Wonderful Day, Briefly !!
May Allah`s peace , mercy and blessing be upon you
Hi again, it's been a while. This time I'm going to talk about another fabulous experience, the ACM-MCPC 2012 (Moroccan Collegiate Programming Contest) it's the 1st edition of the local qualification programming contest to the ACM-ACPC (Arab Collegiate Programming. Contest).
First of all I'll like to thank my university ENSIAS and the ACM represented by Eng. Mohamed Fouad (Deputy Regional Contest Director) and the judges. Also I'll like to thank the organizing committee for the great work, and congratulate them for organizing the event in record time.
Hi again, it's been a while. This time I'm going to talk about another fabulous experience, the ACM-MCPC 2012 (Moroccan Collegiate Programming Contest) it's the 1st edition of the local qualification programming contest to the ACM-ACPC (Arab Collegiate Programming. Contest).
First of all I'll like to thank my university ENSIAS and the ACM represented by Eng. Mohamed Fouad (Deputy Regional Contest Director) and the judges. Also I'll like to thank the organizing committee for the great work, and congratulate them for organizing the event in record time.
Subscribe to:
Posts (Atom)