上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页
摘要: 题目链接: http://poj.org/problem?id=2771 Description Frank N. Stein is a very conservative high-school teacher. He wants to take some of his students on a 阅读全文
posted @ 2018-05-22 20:57 Reqaw 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://cn.vjudge.net/problem/CodeForces-977F 1 /* 2 问题 3 输入n和n个数的数列 4 计算并输出最长增量为1的上升子序列 5 6 解题思路 7 用n2的最长上升子序列求解是不可行的,应为n的规模是(1≤n≤2*10^5),所以想到只 阅读全文
posted @ 2018-05-20 19:58 Reqaw 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1535 Problem Description In the age of television, not many people attend theater performances. Antiqu 阅读全文
posted @ 2018-05-20 09:59 Reqaw 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=3371 Problem Description In 2100, since the sea level rise, most of the cities disappear. Though some 阅读全文
posted @ 2018-05-17 22:55 Reqaw 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://poj.org/problem?id=1679 Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanni 阅读全文
posted @ 2018-05-17 22:49 Reqaw 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3692 Description In a kindergarten, there are a lot of kids. All girls of the kids know each other and all boys also kn 阅读全文
posted @ 2018-05-17 22:46 Reqaw 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 在二分图匹配中有最大匹配问题,使用匈牙利算法或者网络流相关算法解决,如果给每条边增加一个权值,求权值和最大的匹配方案就叫做最大权匹配问题。其实之前所说的最大匹配就是权值为1的最大权匹配。 求最大权完备匹配常用的方法是Kuhn-Munkres算法(简称KM算法),其主要思想就是通过顶标将求最大权匹配问 阅读全文
posted @ 2018-05-17 22:44 Reqaw 阅读(660) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3878 1 /* 2 问题 3 很有意思的一道题目,纯模拟,注意细节和最后一行的空格就行了 4 */ 5 6 #include<iostream> 7 #inclu 阅读全文
posted @ 2018-05-17 22:38 Reqaw 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://cn.vjudge.net/problem/UVA-11582 1 /* 2 问题 3 输入a,b,n(0<a,b<2^64(a and bwill not both be zero) and 1<n<1000) 4 计算并输出f(a^b)%n的结果 5 其中f(i)是斐波 阅读全文
posted @ 2018-05-09 19:50 Reqaw 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 题目链接 :http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5592 Japari Park is a large zoo home to extant species, endangered species, extinct s 阅读全文
posted @ 2018-05-07 11:57 Reqaw 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=2349 Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless net 阅读全文
posted @ 2018-05-06 00:00 Reqaw 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1576 题目: Problem Description 要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。 Inpu 阅读全文
posted @ 2018-05-04 19:12 Reqaw 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.nyist.edu.cn/JudgeOnline/problem.php?pid=1013 描述 给出一个这样的除法表达式:X1/X2/X3/···/Xk,其中Xi是正整数。除法表达式应当按照从左到右的顺序求和,例如表达式1/2/1/2的值为1/4。但是可以在表达式 阅读全文
posted @ 2018-05-04 16:30 Reqaw 阅读(436) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Kudo’s real name is not Kudo. Her name is Kudryavka Anatolyevna Strugatskia, and Kudo is only her nickname. Now, she is facing an emergency in he 阅读全文
posted @ 2018-05-01 16:07 Reqaw 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://cn.vjudge.net/problem/UVA-136 1 /*问题 2 输出第1500个丑数,丑数的定义是不能被2,3,5以外的其他素数整除的数 3 4 解题思路 5 直接硬暴力先试一下发现枚举的时候不知道它能被那个素数整除,况且打很大的素数表依次遍历也不一定能够找 阅读全文
posted @ 2018-04-28 20:36 Reqaw 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 题目链接: http://acm.nyist.edu.cn/JudgeOnline/problem.php?pid=1255 描述 Given N (4 <= N <= 100) rectangles and the lengths of their sides ( integers in the 阅读全文
posted @ 2018-04-26 20:20 Reqaw 阅读(399) 评论(0) 推荐(0) 编辑
摘要: HDU 2089 不要62 题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=2089 Problem Description 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不 阅读全文
posted @ 2018-04-26 11:46 Reqaw 阅读(436) 评论(0) 推荐(1) 编辑
摘要: 题目描述 这是一个斐波那契数列: f1 = 1 f2 = 2 fn = fn-1 + fn-2 (n>=3) 蔡老板想知道,给你两个数 a、b,你能否求出在区间[a,b]里有多少个斐波那契数。 输入 多组数据输入。一行为一组输入数据,包括两个非负整数 a、b(a <= b <= 10^100),当a 阅读全文
posted @ 2018-04-19 12:09 Reqaw 阅读(558) 评论(0) 推荐(0) 编辑
摘要: 题目描述 NEUQ 的谷神要和我赌一个游戏:谷神要求我随机在纸上写出整数集合{1,2,3,...,3n+1} (n 是整数)的一个排列(即不重复的随机写出从 1 到 3n+1 的所有整数)。并且要求在我写的过程中,从我写的第一个数开始一直加到我正在写的数的总和不被 3 整除。如果我能写出来符合要求的 阅读全文
posted @ 2018-04-18 09:05 Reqaw 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 题目链接: https://cn.vjudge.net/problem/UVA-227 1 /* 2 问题 输入一个5*5的方格,其中有一些字母填充,还有一个空白位置,输入一连串 3 的指令,如果指令合法,能够得到一个移动后的方格就输出方格,不能就输出 4 “This puzzle has no f 阅读全文
posted @ 2018-04-16 11:20 Reqaw 阅读(153) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页