07 2019 档案

摘要:Problem Description You are given a 4 × 4 grid, which consists of 15 number cells and an empty cell.All numbers are unique and ranged from 1 to 15.In 阅读全文
posted @ 2019-07-31 19:32 black_hole6 阅读(293) 评论(0) 推荐(0) 编辑
摘要:Tom is playing a game called Idiomatic Phrases Game. An idiom consists of several Chinese characters and has a certain meaning. This game will give To 阅读全文
posted @ 2019-07-31 10:35 black_hole6 阅读(286) 评论(0) 推荐(0) 编辑
摘要:最短路(vector+Dijkstra优先队列优化) #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<queue> #include<stack> #include<set> #in 阅读全文
posted @ 2019-07-29 22:10 black_hole6 阅读(195) 评论(0) 推荐(0) 编辑
摘要:A friend of yours, an inventor, has built a spaceship recently and wants to explore space with it. During his first voyages, he discovered that the un 阅读全文
posted @ 2019-07-29 21:28 black_hole6 阅读(203) 评论(0) 推荐(0) 编辑
摘要:Bessie and the rest of Farmer John's cows are taking a trip this winter to go skiing. One day Bessie finds herself at the top left corner of an R (1 < 阅读全文
posted @ 2019-07-29 20:00 black_hole6 阅读(235) 评论(0) 推荐(0) 编辑
摘要:Problem Description Farmer John keeps a website called ‘FansBlog’ .Everyday , there are many people visited this blog.One day, he find the visits has 阅读全文
posted @ 2019-07-29 17:32 black_hole6 阅读(391) 评论(0) 推荐(0) 编辑
摘要:An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to large 阅读全文
posted @ 2019-07-28 22:35 black_hole6 阅读(267) 评论(0) 推荐(0) 编辑
摘要:Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such that there is 阅读全文
posted @ 2019-07-28 11:32 black_hole6 阅读(291) 评论(0) 推荐(0) 编辑
摘要:一个A和两个B一共可以组成三种字符串:"ABB","BAB","BBA". 给定若干字母和它们相应的个数,计算一共可以组成多少个不同的字符串. Input每组测试数据分两行,第一行为n(1<=n<=26),表示不同字母的个数,第二行为n个数A1,A2,...,An(1<=Ai<=12),表示每种字母 阅读全文
posted @ 2019-07-27 11:05 black_hole6 阅读(305) 评论(0) 推荐(0) 编辑
摘要:五一到了,PKU-ACM队组织大家去登山观光,队员们发现山上一个有N个景点,并且决定按照顺序来浏览这些景点,即每次所浏览景点的编号都要大于前一个浏览景点的编号。同时队员们还有另一个登山习惯,就是不连续浏览海拔相同的两个景点,并且一旦开始下山,就不再向上走了。队员们希望在满足上面条件的同时,尽可能多的 阅读全文
posted @ 2019-07-27 09:29 black_hole6 阅读(239) 评论(0) 推荐(0) 编辑
摘要:Given two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer b if and only i 阅读全文
posted @ 2019-07-26 20:01 black_hole6 阅读(256) 评论(0) 推荐(0) 编辑
摘要:In the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the prosperity of China and Beijing Olympics is to be a festival f 阅读全文
posted @ 2019-07-26 11:17 black_hole6 阅读(173) 评论(0) 推荐(0) 编辑
摘要:You are playing a two player game. Initially there are n integer numbers in an array and player A and B get chance to take them alternatively. Each pl 阅读全文
posted @ 2019-07-26 10:31 black_hole6 阅读(201) 评论(0) 推荐(0) 编辑
摘要:Diophantus of Alexandria was an Egypt mathematician living in Alexandria. He was one of the first mathematicians to study equations where variables we 阅读全文
posted @ 2019-07-24 22:24 black_hole6 阅读(209) 评论(0) 推荐(0) 编辑
摘要:You've got a string s = s1s2... s|s| of length |s|, consisting of lowercase English letters. There also are q queries, each query is described by two 阅读全文
posted @ 2019-07-24 21:24 black_hole6 阅读(194) 评论(0) 推荐(0) 编辑
摘要:Problem Description One day, Y_UME got an integer N and an interesting program which is shown below:Y_UME wants to play with this program. Firstly, he 阅读全文
posted @ 2019-07-24 20:41 black_hole6 阅读(598) 评论(2) 推荐(0) 编辑
摘要:题目描述 求关于xx的同余方程 a x \equiv 1 \pmod {b}ax≡1(modb) 的最小正整数解。 输入输出格式 输入格式: 一行,包含两个正整数 a,ba,b,用一个空格隔开。 输出格式: 一个正整数 x_0x0​,即最小正整数解。输入数据保证一定有解。 输入输出样例 输入样例#1 阅读全文
posted @ 2019-07-23 10:30 black_hole6 阅读(196) 评论(0) 推荐(0) 编辑
摘要:Tom and Jerry are going on a vacation. They are now driving on a one-way road and several cars are in front of them. To be more specific, there are nn 阅读全文
posted @ 2019-07-22 22:27 black_hole6 阅读(171) 评论(0) 推荐(0) 编辑
摘要:In mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the rema 阅读全文
posted @ 2019-07-22 22:04 black_hole6 阅读(173) 评论(0) 推荐(0) 编辑
摘要:题目描述 在一个圆形操场的四周摆放N堆石子,现要将石子有次序地合并成一堆.规定每次只能选相邻的2堆合并成新的一堆,并将新的一堆的石子数,记为该次合并的得分。 试设计出1个算法,计算出将N堆石子合并成1堆的最小得分和最大得分. 输入输出格式 输入格式: 数据的第1行试正整数N,1≤N≤100,表示有N 阅读全文
posted @ 2019-07-22 21:22 black_hole6 阅读(319) 评论(0) 推荐(0) 编辑
摘要:Description Description 有n堆石子排成一行,每次选择相邻的两堆石子,将其合并为一堆,记录该次合并的得分为两堆石子个数之和。已知每堆石子的石子个数,求当所有石子合并为一堆时,最小的总得分。 有n堆石子排成一行,每次选择相邻的两堆石子,将其合并为一堆,记录该次合并的得分为两堆石子 阅读全文
posted @ 2019-07-22 21:02 black_hole6 阅读(337) 评论(0) 推荐(0) 编辑
摘要:题目描述 设有N \times NN×N的方格图(N \le 9)(N≤9),我们将其中的某些方格中填入正整数,而其他的方格中则放入数字00。如下图所示(见样例): 某人从图的左上角的AA点出发,可以向下行走,也可以向右走,直到到达右下角的BB点。在走过的路上,他可以取走方格中的数(取走后的方格中将 阅读全文
posted @ 2019-07-22 16:16 black_hole6 阅读(556) 评论(0) 推荐(0) 编辑
摘要:https://acm.taifua.com/archives/guide.html 阅读全文
posted @ 2019-07-22 14:40 black_hole6 阅读(192) 评论(0) 推荐(0) 编辑
摘要:题目描述 在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆。多多决定把所有的果子合成一堆。 每一次合并,多多可以把两堆果子合并到一起,消耗的体力等于两堆果子的重量之和。可以看出,所有的果子经过 n−1n-1n−1 次合并之后, 就只剩下一堆了。多多在合并果子时总共消耗的 阅读全文
posted @ 2019-07-22 11:14 black_hole6 阅读(146) 评论(0) 推荐(0) 编辑
摘要:Avin is studying series. A series is called "wave" if the following conditions are satisfied: 1) It contains at least two elements; 2) All elements at 阅读全文
posted @ 2019-07-22 09:35 black_hole6 阅读(744) 评论(0) 推荐(0) 编辑
摘要:Problem Description Avin is studying how to synthesize data. Given an integer n, he constructs an interval using the following method: he first genera 阅读全文
posted @ 2019-07-21 15:41 black_hole6 阅读(464) 评论(2) 推荐(0) 编辑
摘要:题目描述 对于Fibonacci数列:1,1,2,3,5,8,13......大家应该很熟悉吧~~~但是现在有一个很“简单”问题:第n项和第m项的最大公约数是多少? Update:加入了一组数据。 输入输出格式 输入格式: 两个正整数n和m。(n,m<=10^9) 注意:数据很大 输出格式: Fn和 阅读全文
posted @ 2019-07-20 22:22 black_hole6 阅读(228) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://cn.vjudge.net/problem/HDU-1425 注意是多组输入 代码: 阅读全文
posted @ 2019-07-20 20:09 black_hole6 阅读(347) 评论(0) 推荐(0) 编辑
摘要:题目链接https://ac.nowcoder.com/acm/contest/881/A(单调栈) 题目链接:https://ac.nowcoder.com/acm/contest/881/F(思维) 三角形面积的22倍 海伦公式版没过 不知道原因 题目链接:https://ac.nowcoder 阅读全文
posted @ 2019-07-18 23:50 black_hole6 阅读(181) 评论(0) 推荐(0) 编辑
摘要:output standard output Alice and Bob play a game. There is a paper strip which is divided into n + 1 cells numbered from left to right starting from 0 阅读全文
posted @ 2019-07-15 17:50 black_hole6 阅读(349) 评论(0) 推荐(0) 编辑
摘要:You are given three strings ss, tt and pp consisting of lowercase Latin letters. You may perform any number (possibly, zero) operations on these strin 阅读全文
posted @ 2019-07-15 17:47 black_hole6 阅读(247) 评论(0) 推荐(0) 编辑
摘要:Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undirected graph 阅读全文
posted @ 2019-07-04 21:37 black_hole6 阅读(552) 评论(0) 推荐(0) 编辑
摘要:Problem Description 勇敢的法里奥出色的完成了任务之后,正在迅速地向自己的基地撤退。但由于后面有着一大群追兵,所以法里奥要尽快地返回基地,否则就会被敌人逮住。终于,法里奥来到了最后的一站:泰拉希尔原野,穿过这里就可以回到基地了。然而,敌人依然紧追不舍。不过,泰拉希尔的地理条件对法里 阅读全文
posted @ 2019-07-03 14:46 black_hole6 阅读(467) 评论(0) 推荐(0) 编辑
摘要:Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchang 阅读全文
posted @ 2019-07-01 22:30 black_hole6 阅读(302) 评论(0) 推荐(0) 编辑

欢迎阅读『2019 年 7月 随笔档案』
点击右上角即可分享
微信分享提示