码迷,mamicode.com
首页 >  
搜索关键字:poj 3348 cows    ( 21218个结果
C - 4 Values whose Sum is 0 POJ - 2785 (折半枚举)(二分搜索)
训练赛上一题,当时没做出来,Orz太弱了 The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c ...
分类:其他好文   时间:2020-04-06 19:02:19    阅读次数:77
【反转开灯问题】Face The Right Way
题目 Farmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a row and many of them are facing forward, like good cows. Some of them are facing backward, ...
分类:其他好文   时间:2020-04-06 17:13:28    阅读次数:68
双连通分量 Road Construction POJ - 3352
@[双连通分量] 题意: 有一个 n 个点 m 条边的无向图,问至少添加几条边,能让该图任意缺少一条边后还能相互连通。 双连通分量定义: 在无向连通图中,如果删除该图的任何一个结点都不能改变该图的连通性,则该图为双连通的无向图。一个连通的无向图是双连通的,当且仅当它没有关节点(这里面节点可换成边:分 ...
分类:其他好文   时间:2020-04-06 11:45:21    阅读次数:62
【反转开灯问题】Face The Right Way
题目 Farmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a row and many of them are facing forward, like good cows. Some of them are facing backward, ...
分类:其他好文   时间:2020-04-06 09:56:48    阅读次数:80
POJ3276 Face The Right Way (尺取法)
题目描述 Farmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a row and many of them are facing forward, like good cows. Some of them are facing backwar ...
分类:其他好文   时间:2020-04-06 00:23:00    阅读次数:298
A - Wireless Network POJ - 2236
题目大意:有n台坏掉的电脑,给出每台电脑的坐标,然后每次询问输入0(字符) x,表示电脑x恢复正常,输入S x y 询问x和y是否可以联网。只要是x和y的距离小于距离d,那么就可以联网,如果有个中介c使得x到c的距离小于d,y到c的距离小于d,那么x和y也可以联网。 题解:当修复好一台电脑后,然后判 ...
分类:Web程序   时间:2020-04-05 22:30:21    阅读次数:80
POJ - 2502 Subway
"POJ 2502 题目链接" 写题过程 这道题目的输入算是一个点了,有点晕一开始看到这题的时候,后面写着写着发现还行。 这题一定要注意单位,题目给的是xx(km/h),一定要转化为xx(m/s)。 还有就是输出的数据我wa了无数遍 思路 不难发现这就是一道最短路的问题,有地铁的路建立双向的快速路, ...
分类:其他好文   时间:2020-04-05 14:00:38    阅读次数:56
POJ 1742(Coins)
题目链接:http://poj.org/problem?id=1742 与一般的背包问题不一样,这是要计算满足条件的情况的数量,而不是计算最值,一开始的思路就是按照书上的类比: dp[i][j] := 用前i种硬币能否凑成j 递推:dp[i][j] = (dp[i – 1][j – k * A[i] ...
分类:其他好文   时间:2020-04-05 13:58:49    阅读次数:69
POJ 2528 线段树+离散化
Description The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral poste ...
分类:其他好文   时间:2020-04-05 00:52:42    阅读次数:87
POJ-3252——Round Numbers
POJ-3252——Round Numbers 传送门:http://poj.org/problem?id=3252 题意:求n-m中二进制表示0的数量不小于1的数的个数 要找二进制0和1的个数,因为是按位数来找的,可以考虑数位dp 状态dp[pos][_0][_1] 表示为dp[当前第几位][含0 ...
分类:其他好文   时间:2020-04-04 21:05:13    阅读次数:68
21218条   上一页 1 ... 25 26 27 28 29 ... 2122 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!