LightOJ
Alex_McAvoy
想要成为渔夫的猎手
展开
-
Halloween Costumes(LightOJ-1422)
Problem DescriptionGappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it's Halloween, these parties are al...原创 2018-08-28 19:19:49 · 290 阅读 · 0 评论 -
Monkey Tradition(LightOJ-1319)
Problem DescriptionIn 'MonkeyLand', there is a traditional game called "Bamboo Climbing". The rules of the game are as follows:1) There are N monkeys who play this game and there are N bamb...原创 2019-03-23 15:32:42 · 308 阅读 · 0 评论 -
Helping Cicada(LightOJ-1117)
Problem DescriptionCicada is an insect with large transparent eyes and well-veined wings similar to the "jar flies". The insects are thought to have evolved 1.8 million years ago during the Pleisto...原创 2019-03-26 15:46:03 · 426 阅读 · 0 评论 -
Mad Counting(LightOJ-1148)
Problem DescriptionMob was hijacked by the mayor of the Town "TruthTown". Mayor wants Mob to count the total population of the town. Now the naive approach to this problem will be counting people o...原创 2019-03-22 19:28:31 · 274 阅读 · 0 评论 -
Race(LightOJ-1326)
Problem DescriptionDisky and Sooma, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded and wandered around, even in their holidays. They passed several months in thi...原创 2019-03-26 13:08:13 · 371 阅读 · 0 评论 -
Knights in Chessboard(LightOJ-1010)
Problem DescriptionGiven an m x n chessboard where you want to place chess knights. You have to find the number of maximum knights that can be placed in the chessboard such that no two knights atta...原创 2019-03-22 17:29:29 · 691 阅读 · 0 评论 -
Aladdin and the Flying Carpet(LightOJ-1341)
Problem DescriptionIt's said that Aladdin had to solve seven mysteries before getting the Magical Lamp which summons a powerful Genie. Here we are concerned about the first mystery.Aladdin was ab...原创 2019-03-18 21:34:52 · 282 阅读 · 0 评论 -
Bi-shoe and Phi-shoe(LightOJ-1370)
Problem DescriptionBamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs some bamboos for his students, so he asked his a...原创 2019-03-18 20:37:21 · 263 阅读 · 0 评论 -
Harmonic Number (LightOJ-1234)
Problem DescriptionIn mathematics, the nth harmonic number is the sum of the reciprocals of the first n natural numbers:In this problem, you are given n, you have to find Hn.InputInput sta...原创 2019-03-20 12:21:21 · 244 阅读 · 0 评论 -
Combinations(LightOJ-1067)
Problem DescriptionGiven n different objects, you want to take k of them. How many ways to can do it?For example, say there are 4 items; you want to take 2 of them. So, you can do it 6 ways.Tak...原创 2019-03-23 16:18:38 · 333 阅读 · 0 评论 -
Problem Makes Problem(LightOJ-1102)
Problem DescriptionAs I am fond of making easier problems, I discovered a problem. Actually, the problem is 'how can you make n by adding k non-negative integers?' I think a small example will make...原创 2019-03-23 16:49:26 · 366 阅读 · 0 评论 -
Island of Survival(LightOJ-1265)
Problem DescriptionYou are in a reality show, and the show is way too real that they threw into an island. Only two kinds of animals are in the island, the tigers and the deer. Though unfortunate b...原创 2019-04-03 11:27:36 · 328 阅读 · 0 评论 -
Throwing Balls into the Baskets(LightOJ-1317)
Problem DescriptionYou probably have played the game "Throwing Balls into the Basket". It is a simple game. You have to throw a ball into a basket from a certain distance. One day we (the AIUB ACMM...原创 2019-04-03 10:50:01 · 512 阅读 · 0 评论 -
Dice (III)(LightOJ-1248)
Problem DescriptionGiven a dice with n sides, you have to find the expected number of times you have to throw that dice to see all its faces at least once. Assume that the dice is fair, that means ...原创 2019-04-03 09:14:16 · 777 阅读 · 1 评论 -
Just another Robbery(LightOJ-1079)
Problem DescriptionAs Harry Potter series is over, Harry has no job. Since he wants to make quick money, (he wants everything quick!) so he decided to rob banks. He wants to make a calculated risk,...原创 2019-04-02 22:20:55 · 521 阅读 · 0 评论 -
Discovering Gold(LightOJ-1030)
Problem DescriptionYou are in a cave, a long cave! The cave can be represented by a 1 x N grid. Each cell of the cave can contain any amount of gold.Initially you are in position 1. Now each turn...原创 2019-04-02 18:50:51 · 898 阅读 · 0 评论 -
Birthday Paradox(LightOJ-1104)
Problem DescriptionSometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose you are in a party where there are 23 people including you. W...原创 2019-04-02 15:01:23 · 342 阅读 · 0 评论 -
A Dangerous Maze(LightOJ-1027)
Problem DescriptionYou are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probability for choosing a door is equal for all doors.If you choose the i...原创 2019-04-02 14:39:24 · 348 阅读 · 0 评论 -
Rooks(LightOJ-1005)
Problem DescriptionA rook is a piece used in the game of chess which is played on a board of square grids. A rook can only move vertically or horizontally from its current position and two rooks at...原创 2019-03-23 18:12:49 · 472 阅读 · 1 评论 -
Harmonic Number (II)(LightOJ-1245)
Problem DescriptionI was trying to solve problem '1234 - Harmonic Number', I wrote the following codelong long H( int n ) { long long res = 0; for( int i = 1; i <= n; i++ ) re...原创 2019-03-20 11:21:58 · 433 阅读 · 0 评论 -
Leading and Trailing(LightOJ-1282)
Problem DescriptionYou are given two integers: n and k, your task is to find the most significant three digits, and least significant three digits of nk.InputInput starts with an integer T (≤ 1...原创 2019-03-19 18:37:45 · 254 阅读 · 0 评论 -
Farthest Nodes in a Tree(LightOJ-1094)
Problem DescriptionGiven a tree (a connected graph with no cycles), you have to find the farthest nodes in the tree. The edges of the tree are weighted and undirected. That means you have to find t...原创 2019-01-16 16:25:01 · 441 阅读 · 0 评论 -
Again Array Queries(LightOJ-1100)
Problem DescriptionGiven an array with n integers, and you are given two indices i and j (i ≠ j) in the array. You have to find two integers in the range whose difference is minimum. You have to pr...原创 2019-01-21 22:23:13 · 298 阅读 · 0 评论 -
Mysterious Bacteria(LightOJ-1220)
Problem DescriptionDr. Mob has just discovered a Deathly Bacteria. He named it RC-01. RC-01 has a very strange reproduction system. RC-01 lives exactly x days. Now RC-01 produces exactly p new dead...原创 2019-01-21 22:15:37 · 478 阅读 · 0 评论 -
Trailing Zeroes(LightOJ-1138)
Problem DescriptionYou task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For example, 5! = 120, 120 contai...原创 2019-03-18 20:15:05 · 246 阅读 · 0 评论 -
Consistent Verdicts(LightOJ-1410)
Problem DescriptionIn a 2D plane N persons are standing and each of them has a gun in his hand. The plane is so big that the persons can be considered as points and their locations are given as Car...原创 2019-01-18 21:32:41 · 333 阅读 · 0 评论 -
Answering Queries(LightOJ-1369)
Problem DescriptionThe problem you need to solve here is pretty simple. You are give a function f(A, n), where A is an array of integers and n is the number of elements in the array. f(A, n) is def...原创 2019-01-18 19:32:37 · 261 阅读 · 0 评论 -
Factors and Multiples(LightOJ-1149)
Problem DescriptionYou will be given two sets of integers. Let's call them set A and set B. Set A contains n elements and set B contains m elements. You have to remove k1 elements from set A and k2...原创 2019-01-23 20:48:28 · 331 阅读 · 0 评论 -
Critical Links(LightOJ - 1026)
Problem DescriptionIn a computer network a link L, which interconnects two servers, is considered critical if there are at least two servers A and B such that all network interconnection paths betw...原创 2019-01-23 20:03:42 · 370 阅读 · 0 评论 -
Fibsieve`s Fantabulous Birthday(LightOJ-1008)
Problem DescriptionFibsieve had a fantabulous (yes, it's an actual word) birthday party this year. He had so many gifts that he was actually thinking of not having a party next year.Among these g...原创 2019-01-22 16:49:54 · 582 阅读 · 0 评论 -
Fast Bit Calculations(LightOJ-1032)
Problem DescriptionA bit is a binary digit, taking a logical value of either 1 or 0 (also referred to as "true" or "false" respectively). And every decimal number has a binary representation which ...原创 2019-01-22 17:24:05 · 340 阅读 · 0 评论 -
Sigma Function(LightOJ-1336)
Problem DescriptionSigma function is an interesting function in Number Theory. It is denoted by the Greek letter Sigma (σ). This function actually denotes the sum of all divisors of a number. For e...原创 2019-03-19 17:39:02 · 284 阅读 · 0 评论 -
Fast Queries(LightOJ-1188)
Problem DescriptionGiven an array of N integers indexed from 1 to N, and q queries, each in the form i j, you have to find the number of distinct integers from index i to j (inclusive).InputInp...原创 2019-03-05 22:15:12 · 324 阅读 · 0 评论 -
Internet Service Providers(LightOJ-1275)
Problem DescriptionA group of N Internet Service Provider companies (ISPs) use a private communication channel that has a maximum capacity of C traffic units per second. Each company transfers T tr...原创 2019-02-13 23:28:31 · 361 阅读 · 0 评论 -
Integer Divisibility(LightOJ-1078)
Problem DescriptionIf an integer is not divisible by 2 or 5, some multiple of that number in decimal notation is a sequence of only a digit. Now you are given the number and the only allowable digi...原创 2019-02-13 23:23:43 · 244 阅读 · 0 评论 -
Ekka Dokka(LightOJ-1116)
Problem DescriptionEkka and his friend Dokka decided to buy a cake. They both love cakes and that's why they want to share the cake after buying it. As the name suggested that Ekka is very fond of ...原创 2019-02-13 23:29:27 · 357 阅读 · 0 评论 -
Positive Negative Sign(LightOJ-1294)
Problem DescriptionGiven two integers: n and m and n is divisible by 2m, you have to write down the first n natural numbers in the following form. At first take first m integers and make their sign...原创 2019-02-13 23:26:47 · 277 阅读 · 0 评论 -
Aladdin and the Optimal Invitation(LightOJ-1349)
Problem DescriptionFinally Aladdin reached home, with the great magical lamp. He was happier than ever. As he was a nice boy, he wanted to share the happiness with all people in the town. So, he wa...原创 2019-02-13 23:24:49 · 312 阅读 · 0 评论 -
February 29(LightOJ-1414)
Problem DescriptionIt is 2012, and it's a leap year. So there is a "February 29" in this year, which is called leap day. Interesting thing is the infant who will born in this February 29, will get ...原创 2019-02-13 23:25:33 · 414 阅读 · 0 评论 -
Trail Maintenance(LightOJ-1123)
Problem DescriptionTigers in the Sunderbans wish to travel freely among theNfields (numbered from1toN), even though they are separated by trees. The tigers wish to maintain trails between pair...原创 2019-04-18 17:45:41 · 368 阅读 · 0 评论