You are on page 1of 14

Mujib Year Practice Contest

(Round 2) (Math Round)

https://toph.co/c/7gefnkc
Schedule
The contest will run for 1h20m0s.

The standings will be frozen for the last 20m0s of the contest.

Authors
The authors of this contest are mashfiqur404, and mdvirus.

Rules
You can use C++11 GCC 7.4, C++17 GCC 9.2, C11 GCC 9.2, and Python 3.7 in this contest.

Be fair, be honest. Plagiarism will result in disqualification. Judges’ decisions will be


final.

Notes
There are 4 challenges in this contest.

Please make sure this booklet contains all of the pages.

If you find any discrepencies between the printed copy and the problem statements in
Toph Arena, please rely on the later.

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 2 of 14


A. #EtaiBdMO2020
#এটাইিবিডএমও২০২০

Limits 500ms, 32 MB

Engl
is h The Math Olympiad Online Selection is going on (Yes, for the first time Online Math
Olympiad! With MCQ test!). Arafat sits in front of his PC. The selection of the junior
category began. They gave 30 questions. He quickly solved the questions and started
clicking on the correct answer. After an hour the selection round is over. Three days later
the results came out. He has been nominated to participate in the regionals. His total
mark is 73! If every correct answer has +5 marks and wrong answer has -2 marks, then
how many questions did he answered correctly?

ব াং ল
া চলেছ গিণত অিলি�য়ােডর অনলাইন বাছাই পব� (ি� হঁ �া। �থমবােরর মেতা অনলাইেন গিণত অিলি�য়াড! তা-
ও আবার �নব��ি�ক �ে�া�েরর মাধ�েম!)। আরাফাত তার িপিসর সামেন বেস আেছ। �র� হেয় �গল জুিনয়র
ক�াটাগিরর বাছাই। �মাট ৩০ টা �� িদেয়েছ। �স তাড়াতািড় �ে�র সমাধান কের স�ক উ�েরর উপর ি�ক করেত
লাগেলা। এক ঘ�া পর বাছাই পব� �শষ হল। িতন িদন পর ফলাফল �বর হল। �স আ�িলক পেব� অংশ �নয়ার জন�
মেনানীত হেয়েছ। তার �মাট মাক� ৭৩! যিদ �িত� স�ক উ�ের +৫ মাক� এবং ভু ল উ�ের -২ মাক� থােক তেব �স
�মাট কত� �ে�র স�ক উ�র িদেয়িছল, বেলােতা?

Input
Engl
is h There is no input for this problem.

ব াং ল
া এই সমস�ার জন� �কােনা ইনপুট �নই।

Output
Engl
is h Print the total amount of the correct answers made by Arafat. After printing that you
can add a blank line for beautying.

ব াং ল
া আউটপুেট এক� লাইেন আরাফােতর �মাট স�ক উ�েরর সংখ�া ি�� কর। ি�� করার পর �সৗ�েয�র জন� এক�
ফঁাকা লাইন �রেখ িদেত পােরা।

Engl
is h Courtesy: BdMO Online Selection Junior 2020

ব াং ল
া �সৗজন�: িবিডএমও অনলাইন বাছাই জুিনয়র ২০২০

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 3 of 14


B. Trap the Ball
বলটােক ফঁােদ �ফেলা

Limits 500ms, 64 MB

Engl
is h I feel unbearable seeing many programming problems. Allah knows why they write a
‘habijabi’ story without describing the problem. I’m not doing anything like that. I’m
going straight to the problem.

You’ll be given the length of the three arms of a triangular box and the diameter of a
ball. You have to say whether the ball can be trapped into the box or not.

ব াং ল
া কত�েলা ��া�ািমং সমস�া �দখেল আমার অসহ� লােগ। সমস�ার �কঠাক বণ�না না িদেয় িক হািবজািব গ� িলেখ
রােখ তা আ�াহই জােনন। আিম এরকম িকছু করিছ না। সরাসির সমস�ায় চেল যাি�।

�তামােক এক� ি�ভু জাকার বাে�র িতন বা�র �দঘ�� এবং এক� বেলর ব�াস �দয়া হেব। বলেত হেব বল�েক ঐ
বাে�র ি�সীমানায় আটেক রাখা যােব কী না।

Input
Engl
is h There will be given the values of the variables a, b, c and d (0 ≤ d ≤ a, b, c < 101) on a line
as input. Which denotes the length of the three arms of the triangular box and the
diameter of that ball, respectively.

It is ensured that you can make a triangular shape with a, b, c.

ব াং ল
া এক� লাইেন a, b, c ও d (0 ≤ d ≤ a, b, c < 101) চলক�েলার মান ইনপুট �দয়া হেব। যা যথা�েম ঐ
ি�ভু জাকার বাে�র িতন বা�র �দঘ�� এবং ঐ বল�র ব�াস �কাশ করেব।

a, b, c িদেয় �য এক� ি�ভু জ বানােনা যােব এটা িনি�ত।

Output
Engl
is h In the output there should be printed either YES or NO. If the ball can be trapped into that
box, then print YES. Otherwise print NO.

ব াং ল
া আউটপুেট YES অথবা NO এর �যেকােনা এক� ি�� করেত হেব। যিদ ঐ বল�েক ঐ বাে�র মেধ� আটেক রাখা
যায় তেব YES ি�� কর। অন�থায় NO ি�� কর।

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 4 of 14


Samples
Input Output
3 4 5 2 YES

Input Output
3 4 5 3 NO

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 5 of 14


C. Scholarship
�লারিশপ

Limits 2s, 512 MB

Engl
is h Your school is going to start a new scholarship program. To apply for this scholarship you
have to write an application and mention how much scholarship do you need. A lot of
students applied for this scholarship and a few of them were selected. Just before
issuing the scholarship, the accountant came to know that, the total budget allotment
for scholarship has been reduced. So it’s not possible to offer the selected candidates
their requested amount. Now if they offer some students less than their requested
amount they will become sad. But the Head master wants to minimize the number of sad
students. Your task is to write a program for the headmaster. The program will find such
a number, that no students will be given more than that amount of money.

ব াং ল
া �তামার �ুেল এক� নতু ন বৃি� চালু হেব। তেব এই বৃি� �পেত হেল এক� আেবদনপ� িলখেত হেব, এবং �সখােন
�তামার কত টাকা বৃি� দরকার, �স� উে�খ করেত হেব। অেনেকই এই বৃি�র জন� আেবদন করল এবং �বশ
কেয়কজন বৃি�র জন� িনব�ািচত হেলা। বৃি� �দওয়ার আেগ, হঠাৎ িহসাবর�ক সােহব জানেত পারেলন �য, �মাট
বৃি�র জন� বরা� বােজট কেম িগেয়েছ। তাই সবাইেক তােদর �েয়াজনীর বৃি�র অথ� �দওয়া স�ব নয়। এখন যােদর
বৃি� আেবদনকৃত অেথ�র �চেয় কম �দওয়া হেব, তােদর �তা মন খারাপ হেয় যােব। িক� িকছু করার �নই। তেব
�হডমা�ার স�ার চান �যন সবেচেয় কম সংখ�ক িশ�াথী�র মন খারাপ হয়। �তামার কাজ হে� স�ােরর জন� একটা
��া�াম িলেখ �দওয়া। ��া�ােমর কাজ হেব, এমন এক� সংখ�া �বর কের �দওয়া, �যন �কােনা িশ�াথী� �সই সংখ�ার
�বিশ বৃি� না পায়।

Input
Engl
is h First line of input will have at most integers. These number represents the amount
of money requested by each students. Second line will have the new allotted budget.
Every number will be >= 0 and < .

ব াং ল
া ��া�ােম �থম লাইেন সেব�া� � পূণ�সংখ�া থাকেব, এ�েলা হে� �েত�েকর আেবদনকৃত বৃি�র পিরমাণ।
ি�তীয় লাইেন থাকেব নতু ন বরা�কৃত বােজট। সব সংখ�ার মান 0-এর সমান িকংবা বড় এবং -এর �চেয় �ছাট
হেব।

Output
Engl
is h Output will have a number, which is the maximum amount allotted budget for a single
student. You have to print two digits after the decimal place.


ব াং ল

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 6 of 14


আউটপুেট এক� সংখ�া ি�� করেত হেব, যা হে� একজন িশ�াথী�র জন� বরা� সেব�া� বােজট। �িত� সংখ�া
ি�� করার সময় দশিমেকর পের দুই ঘর ি�� করেত হেব।

Samples
Input Output
100 2 50 120 1000 47.00
190

Engl
is h Note - for sample input. If we allot at most Tk. for each students, then total expense
would be, . The student who applied for Tk. , he will be
given Tk. only, no more than that.

ব াং ল
া �নাট - নমুনা ইনপুেটর জন�, আমরা যিদ �িত িশ�াথী�র জন� সেব�া� টাকা বােজট বরা� কির, তাহেল �মাট
খরচ হেব, । �য টাকার জন� আেবদন কেরেছ, তােক িক� টাকাই
�দওয়া হেব, এর �বিশ না।

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 7 of 14


D. Brush Drawing
তু িলর আঁচড়

Limits 1s, 512 MB

Engl
is h Arav is a curious young boy. He is learning to draw circles. He only got one color but a lot
of brushes for his birthday, and he is going to use them to draw circles.

First he will find a huge piece of circular shaped paper. Imagine the center of this paper
is at (0, 0).

Next he will pick a brush of his choice. There are a lot of brushes and each one gives a
specific width, say D. Now he will make a stroke with the brush R distance away from the
center. The stroke will look like an arc in a circle.

After he has finished the drawing, can you help his parents by analyzing what is the total
area painted?

Below is the drawing of the sample input-output.

The state without coloring:

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 8 of 14


The state after coloring:

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 9 of 14


In short, you will have to find the green area.

ব াং ল
া আরভ খুব উৎসািহ �ছেল। �স এখন �ুেল বৃ� আঁকা িশখেছ। যিদও তার কােছ মা� এক� রং আেছ িক� তার কােছ
জ�িদেন উপহার পাওয়া অেনক�েলা রং করার �াশ আেছ। �স এই �াশ�েল ব�বহার কের বৃ� আঁকেব।

�থেম �স এক� বেড়াসেড়া বৃ�াকৃিত কাগজ �নেব। মেন কেরা কাগজ�র �ক� রেয়েছ িব�ুেত।

এরপের �স তার পছ�মেতা এক� �াশ তু েল �নেব। তার কােছ অেনক�েলা �াশ আেছ, যার �িত�র এক� িন�দ��
�শ�তা, ধরা যাক আেছ। এখন �স �াশ�েক কাগেজর �ক� �থেক দুরে� এক� আঁচড় কাটেব। আঁচড়�
�দখেত এক� বৃ�চােপর মেতা হেব।

তার আঁকাআঁিক �শষ হেল, �স �মাট কতটু কু ��� রং কেরেছ তা িহসাব করেত ওর বাবা-মােক িক তু িম সাহায�
করেত পারেব?

িনেচ তার আঁকাআঁিকর এক� নমুনা ছিব �দওয়া আেছ।

রং করা ছাড়া �ধু �ােশ আঁচেড়র ছিব:

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 10 of 14


রং করা সহ ছিব:

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 11 of 14


সংে�েপ বলেত �গেল, �তামােক এই সবুজ অংশটু কুর ���ফল �বর করেত হেব।

Input
Engl
is h The first line of the input is the number of test cases, there will be at most 10 test cases.

Each test cases starts with one number, the number of strokes N (1 ≤ N ≤ 10000) Arav is
going to make.

The next N lines each contain four integers, the width of the brush D (1 ≤ D ≤ 100), the
distance from center R (0 ≤ R ≤ 10000), the start angle X and end angle Y of the stroke (0
≤ X < Y < 360). It means he makes a stroke of brush from angle X to angle Y.

ব াং ল
া ইনপুেটর �থম লাইেন �মাট �ট� �কেসর সংখ�া থাকেব। �ট� �কেসর সংখ�া হেব সেব�া� ।

�িত� �ট� �কেসর �র� থাকেব এক� সংখ�া যা হে� আরেভর আঁকা �মাট
আঁচেড়র সংখ�া।

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 12 of 14


পরবতী� -সংখ�ক লাইেনর �িত�েত থাকেব চার� কের পূন�সংখ�া, �ােশর �শ�তা ,
কাগেজর �ক� �থেক দুর� , আঁচড় �র�র �কাণ এবং �শেষর �কাণ . অথ�াৎ,
এেকক� �ােশর আঁচড় হেব �কাণ �থেক �কাণ পয��।

Output
Engl
is h For each case write the area in a separate line. The value must be within 0.00001 of the
actual solution.

ব াং ল
া �িত� �ট� �কেসর জন� রং করা এলাকার ���ফল আলাদা আলাদা লাইেন ি�� করেত হেব। ফলাফল
অবশ�ই �কৃত ফলাফেলর এর আেশপােশ থাকেত হেব।

Samples
Input Output
1 20.15855286
2
2 5 60 120
2 6 45 90

Engl
is h Be careful with precision.

ব াং ল
া দশিমেকর ব�াপাের খুব সতক� থাকেব হেব।

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 13 of 14


This page is intentionally left (almost) blank.

Mujib Year Practice Contest (Round 2) (Math Round) | Toph 14 of 14

You might also like