北林 算法设计与分析oj
文章平均质量分 65
😅
鹤天寻
dive into it!
展开
-
北林oj-算法设计与分析-Tom palindrome number
描述Tom is studing math these days. If there is a number X, whose binary form and decimal form are all palindrome numbers, Tom names it "Tom palindrome number". And Tom wants to know how many "Tom palindrome number" there are between N and M ? (1001,66,644原创 2022-03-24 13:43:29 · 794 阅读 · 0 评论 -
北林oj-算法设计与分析-Tom palindrome number
描述Tom is studing math these days. If there is a number X, whose binary form and decimal form are all palindrome numbers, Tom names it "Tom palindrome number". And Tom wants to know how many "Tom palindrome number" there are between N and M ? (1001,66,6原创 2022-03-23 22:47:19 · 164 阅读 · 0 评论 -
北林oj-算法设计与分析-Don‘t touch my cake(题意+代码)
描述A boy bought N different cakes someday. They were arranged randomly in a line given by permutation P=[p1, p1, ..., pn], where pi denotes the unique label of a cake. To play a game, his mother sorted some subsegment of permutation P from position L to p原创 2022-03-23 19:04:23 · 793 阅读 · 0 评论 -
北林oj-算法设计与分析-Removing the Wall(C++,思路+代码)
描述There is a wall in Tom's garden, which is builded by N different bricks. Bricks may have different height, but their width are the same. For example, when N is 7, and H=[1,2,6,1,1,7,1], this wall will be look like:One day, Tom bought a new car and原创 2022-03-20 22:01:27 · 1489 阅读 · 0 评论 -
北林oj-算法设计与分析-A dice game(思路+代码)
描述One day, boy A and girl B are playing a dice game. First, they write a number between 1~6 in a piece of paper, and then roll the dice. The one whose number is closer to the number of the dice will win this game. For example, A wins if |a-x|<|b-x|. A原创 2022-03-20 21:12:20 · 745 阅读 · 0 评论 -
北林oj-算法设计与分析-Line up in the canteen(两种解法,附思路)
描述One day, there is a kind of new delicious food from one of the windows in the canteen. All students want to have a taste. Therefore, they all go to this window to line up and form a sequence. We need to simplify this sequence. For example, if a sequenc原创 2022-03-20 21:01:22 · 621 阅读 · 0 评论 -
北林oj-算法设计与分析-Simple Count(C++,思路+代码)
描述Count how many numbers do not contain 4 or 7 in the N numbers from 1 to N.输入Each test case starts with 1 <= N <= 1,000,000. The input is terminated by the end of file (EOF).输出For each test case, print how many numbers from 1 to N do not c原创 2022-03-20 20:32:15 · 1465 阅读 · 0 评论