lightoj1116

maksyuki 发表于 oj 分类,标签:
0
lightoj1116

1116 - Ekka Dokka

They want to divide the cake such that N * M = W, where W is the dashing factor set by them. Now you know their dashing factor, you have to find whether they can buy the desired cake or not.Ekka and his friend Dokka decided to buy >>继续阅读

lightoj1113

maksyuki 发表于 oj 分类,标签:
0
lightoj1113

1113 - Discover the Web

BACK: If the backward stack is empty, the command is ignored. Otherwise, push the current page on the top of the forward stack. Pop the page from the top of the backward stack, making it the new current page.Standard web bro >>继续阅读

lightoj1112

maksyuki 发表于 oj 分类,标签:
0
lightoj1112

1112 - Curious Robin Hood

Now each time he can he can do one of the three tasks.Robin Hood likes to loot rich people since he helps the poor people with this money. Instead of keeping all the money together he does another trick. He keeps n sacks w >>继续阅读

lightoj1088

maksyuki 发表于 oj 分类,标签:
0
lightoj1088

1088 - Points in Segments

For example if the points are 1, 4, 6, 8, 10. And the segment is 0 to 5. Then there are 2 points that lie in the segment.Given n points (1 dimensional) and q segments, you have to find the number of points that lie in each >>继续阅读

lightoj1083

maksyuki 发表于 oj 分类,标签:
0
lightoj1083

1083 - Histogram

Usually, histograms are used to represent discrete distributions, e.g., the frequencies of characters in texts. Note that the order of the rectangles, i.e., their heights, is important. Calculate the area of the largest rectangle i >>继续阅读

lightoj1080

maksyuki 发表于 oj 分类,标签:
0
lightoj1080

1080 - Binary Simulation

'I i j'    which means invert the bit from i to j (inclusive)Given a binary number, we are about to do some operations on the number. Two types of operations can be here.

'Q i'    answer whether the ith bit is 0 or 1

Th >>继续阅读

lightoj1078

maksyuki 发表于 oj 分类,标签:
0
lightoj1078

1078 - Integer Divisibility

For example you have to find a multiple of 3 which contains only 1's. Then the result is 3 because is 111 (3-digit) divisible by 3. Similarly if you are finding some multiple of 7 which contains only 3's then, the result >>继续阅读

lightoj1074

maksyuki 发表于 oj 分类,标签:
0
lightoj1074

1074 - Extended Traffic

InputDhaka city is getting crowded and noisy day by day. Certain roads always remain blocked in congestion. In order to convince people avoid shortest routes, and hence the crowded roads, to reach destination, the city autho >>继续阅读

lightoj1070

maksyuki 发表于 oj 分类,标签:
0
lightoj1070

1070 - Algebraic Problem

InputGiven the value of a+b and ab you will have to find the value of an+bna and b not necessarily have to be real numbers.

Input starts with an integer T (≤ 10000), denoting the number of test cases.

Each case contai >>继续阅读

lightoj1067

maksyuki 发表于 oj 分类,标签:
0
lightoj1067

1067 - Combinations

For example, say there are 4 items; you want to take 2 of them. So, you can do it 6 ways.Given n different objects, you want to take k of them. How many ways to can do it?

Input

Input starts with an integer T (≤ 2000), denot >>继续阅读

lightoj1062

maksyuki 发表于 oj 分类,标签:
0
lightoj1062

1062 - Crossed Ladders

InputA narrow street is lined with tall buildings. An x foot long ladder is rested at the base of the building on the right side of the street and leans on the building on the left side. A y foot long ladder is rested at the >>继续阅读

lightoj1056

maksyuki 发表于 oj 分类,标签:
0
lightoj1056

1056 - Olympics

One of the most important tasks is to build the stadium. You are appointed as a programmer to help things out in certain matters - more specifically in designing and building the athletics tracks. After some study, you find out that >>继续阅读

lightoj1054

maksyuki 发表于 oj 分类,标签: , ,
0
lightoj1054

1054 - Efficient Pseudo Code

pseudo codeSometimes it's quite useful to write pseudo codes for problems. Actually you can write the necessary steps to solve a particular problem. In this problem you are given a pseudo code to solve a problem and you >>继续阅读

lightoj1045

maksyuki 发表于 oj 分类,标签:
0
lightoj1045

1045 - Digits of Factorial

f(0) = 1 f(n) = f(n - 1) * n, if(n > 0)Factorial of an integer is defined by the following function

So, factorial of 5 is 120. But in different bases, the factorial may be different. For example, factorial of 5 in ba >>继续阅读

lightoj1043

maksyuki 发表于 oj 分类,标签:
0
lightoj1043

1043 - Triangle Partitioning

You are given ABAC and BCDE is parallel to BC. You are also given the area ratio between ADE and BDEC. You have to find the value of AD.See the picture below.

Input

Input starts with an integer T (≤ 25), denotin >>继续阅读

lightoj1042

maksyuki 发表于 oj 分类,标签:
0
lightoj1042

1042 - Secret Origins

But we do know the story of the first time she set out to chart her own path in the time stream. Zephyr had just finished building her time machine which she named - "Dokhina Batash". She was making the final adjustments for h >>继续阅读