摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=47http://poj.org/problem?id=1700解题思路:求最少需要多少时间才能都通过。先将每个人过河所需的时间升序排序1#include2#include3#include45inta...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=914Yougth的最大化时间限制:1000ms | 内存限制:65535KB难度:4描述Yougth现在有n个物品的重量和价值分别是Wi和Vi,你能帮他从中选出k个物品使得单位重量的价值最大吗?输入有...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=1103区域赛系列一多边形划分时间限制:1000ms | 内存限制:65535KB难度:2描述Give you a convex(凸边形), diagonal n-3 disjoint divided ...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=586http://poj.org/problem?id=2456解题思路:最大化最小值二分答案即可1#include2#include3#include45inta[100100];6intn,c,i...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=248BUYING FEED时间限制:3000ms | 内存限制:65535KB难度:4描述FarmerJohnneeds to travel to town to pick up K (1 2#inc...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=236心急的C小加时间限制:1000ms | 内存限制:65535KB难度:4描述C小加有一些木棒,它们的长度和质量都已经知道,需要一个机器处理这些木棒,机器开启的时候需要耗费一个单位的时间,如果第i+...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=14会场安排问题时间限制:3000ms | 内存限制:65535KB难度:4描述学校的小礼堂每天都会有许多活动,有时间这些活动的计划时间会发生冲突,需要选择出一些活动进行举办。小刘的工作就是安排学校小礼...
阅读全文
摘要:http://codeforces.com/problemset/problem/489/DD. Unbearable Controversy of Beingtime limit per test1 secondmemory limit per test256 megabytesinputstan...
阅读全文
摘要:http://codeforces.com/problemset/problem/489/CC. Given Length and Sum of Digits...time limit per test1 secondmemory limit per test256 megabytesinputst...
阅读全文
摘要:http://codeforces.com/problemset/problem/489/BB. BerSU Balltime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstand...
阅读全文
摘要:http://codeforces.com/problemset/problem/489/AA. SwapSorttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandar...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=44子串和时间限制:5000ms | 内存限制:65535KB难度:3描述给定一整型数列{a1,a2...,an},找出连续非空子串{ax,ax+1,...,ay},使得该子序列的和最大,其中,123i...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=36最长公共子序列时间限制:3000ms | 内存限制:65535KB难度:3描述咱们就不拐弯抹角了,如题,需要你做的就是写一个程序,得出最长公共子序列。tip:最长公共子序列也称作最长公共子串(不要求...
阅读全文
摘要:http://poj.org/problem?id=3253Fence RepairTime Limit:2000MSMemory Limit:65536KTotal Submissions:27357Accepted:8895DescriptionFarmer John wants to repa...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1754I Hate ItTime Limit: 9000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1166敌兵布阵Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): ...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=12喷水装置(二)时间限制:3000ms | 内存限制:65535KB难度:4描述有一块草坪,横向长w,纵向长为h,在它的橫向中心线上不同位置处装有n(nhttp://www.cnblogs.com/a...
阅读全文
摘要:http://poj.org/problem?id=3069Saruman's ArmyTime Limit:1000MSMemory Limit:65536KTotal Submissions:4256Accepted:2186DescriptionSaruman the White must l...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=915+-字符串时间限制:1000ms | 内存限制:65535KB难度:1描述Shiva得到了两个只有加号和减号的字符串,字串长度相同。Shiva一次可以把一个加号和它相邻的减号交换。他想知道最少需要...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=1057寻找最大数(三)时间限制:1000ms | 内存限制:65535KB难度:2描述给出一个整数N,每次可以移动2个相邻数位上的数字,最多移动K次,得到一个新的整数。求这个新的整数的最大值是多少。输...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=1036非洲小孩时间限制:1000ms | 内存限制:65535KB难度:2描述家住非洲的小孩,都很黑。为什么呢?第一,他们地处热带,太阳辐射严重。第二,他们不经常洗澡。(常年缺水,怎么洗澡。)现在,在...
阅读全文
摘要:http://poj.org/problem?id=3617Best Cow LineTime Limit:1000MSMemory Limit:65536KTotal Submissions:10603Accepted:3187DescriptionFJ is about to take hisN...
阅读全文
摘要:http://acm.nyist.net/JudgeOnline/problem.php?pid=891找点时间限制:2000ms | 内存限制:65535KB难度:2描述上数学课时,老师给了LYH一些闭区间,让他取尽量少的点,使得每个闭区间内至少有一个点。但是这几天LYH太忙了,你们帮帮他吗?输入...
阅读全文
摘要:Problem Description有一个包含n个数字的序列,刚开始时它的第i个数字为i。光标刚开始指向第一个数字(1),现在我们有如下几种操作:1 -光标左移(保证左边有数字)。2 -光标右移(保证右边有数字)。3 x -在光标前面加入一个数字。4 x -在光标后面加入一个数字。5 -删除光标前...
阅读全文
摘要:ZOJ地址:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=360POJ地址:http://poj.org/problem?id=1328解题思路:贪心1#include2#include3#include4#include56s...
阅读全文
摘要:比较简单的一道深搜题目,适合练手1//题目链接:http://poj.org/problem?id=23862//解题思路:将湖泊定义为1,陆地定义为0,dfs搜索每个点即可3#include4#include56intmap[110][110],vis[110][110];//map模拟地图,vi...
阅读全文
摘要:1//题目地址:http://acm.nyist.net/JudgeOnline/status.php?pid=272//解题思路:裸的dfs,遍历每个格子dfs访问当前格子的相领格子3#include4#include56intmap[110][110],vis[110][110];7intdx[...
阅读全文
摘要:1//题目地址:http://acm.njupt.edu.cn/acmhome/problemdetail.do?method=showdetail&id=11022//解题思路:遍历每个格子dfs访问当前格子的相领黑格3#include4#include56#defineMAXN100078int...
阅读全文
摘要:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=36The 3n+ 1 problemBackgroundProblems in Computer Scien...
阅读全文