码迷,mamicode.com
首页 >  
搜索关键字:sticks    ( 387个结果
hdu 1051 Wooden Sticks
简单贪心。 将所给数据从小到大进行排序,将所给零件的两数据均小于还有一个零件的两数据,看做一个集合。 最后输出集合个数。#include<iostream> #include<stdlib.h> #include<stdio.h> #include<string.h> #include<algori ...
分类:其他好文   时间:2017-04-23 18:07:16    阅读次数:111
POJ Sticks1011解题报告
1 //Sticks1011 By XieJiang 20170417 2 /** 3 *0.最小木棍的长度一定小于等于所有木棍长度之和,大于等于输入的最长的木棍 4 *1.当Sticks[i]可用时,而Sticks[i-1]不可用且Sticks[i-1]=Sticks[i],Sticks[i]不可... ...
分类:其他好文   时间:2017-04-18 00:42:19    阅读次数:235
POJ-2513 Colored Sticks 【欧拉通路+Trie】
Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a st ...
分类:其他好文   时间:2017-04-07 23:31:38    阅读次数:209
POJ2653 Pick-up sticks 判断线段相交
POJ2653 判断线段相交的方法 先判断直线是否相交 再判断点是否在线段上 复杂度是常数的 题目保证最后答案小于1000 故从后往前尝试用后面的线段 "压"前面的线段 排除不可能的答案 就可以轻松AC了。 ...
分类:其他好文   时间:2017-04-06 01:20:33    阅读次数:154
POJ 2513 Colored Sticks(欧拉道路+字典树+并查集)
http://poj.org/problem?id=2513 题意: 给定一些木棒,木棒两端都涂上颜色,求是否能将木棒首尾相接,连成一条直线,要求不同木棒相接的一边必须是相同颜色的。 思路: 题目很明显的是欧拉道路的问题。 欧拉道路的关键是: ①图是连通的。 ②最多只能有两个奇点。(不能只存在一个奇 ...
分类:其他好文   时间:2017-03-30 00:22:57    阅读次数:226
UVA-10003 Cutting Sticks (区间DP)
题目链接:https://vjudge.net/problem/UVA-10003 思路: 石子合并问题的逆过程,做法一模一样; Code: ...
分类:其他好文   时间:2017-02-06 16:53:44    阅读次数:161
POJ 2653 Pick-up sticks [线段相交 迷之暴力]
Pick-up sticks Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 12861 Accepted: 4847 Description Stan has n sticks of various length. He thr ...
分类:其他好文   时间:2017-01-27 18:43:20    阅读次数:235
Sicily-Stick
Description Anthony has collected a large amount of sticks for manufacturing chopsticks. In order to simplify his job, he wants to fetch two equal-len ...
分类:其他好文   时间:2017-01-19 18:05:33    阅读次数:193
hdu1051
#include<iostream> #include<algorithm> using namespace std; struct SIZE { int l; int w; }sticks[5005]; int flag[5005]; bool cmp(const SIZE &a,const SI ...
分类:其他好文   时间:2017-01-18 01:00:20    阅读次数:194
poj练习题的方法
poj1010——邮票问题 DFSpoj1011——Sticks dfs + 剪枝poj1020——拼蛋糕poj1054——The Troublesome Frogpoj1062——昂贵的聘礼poj1077——Eightpoj1084——Square Destroyerpoj1085——Triang ...
分类:其他好文   时间:2016-12-13 16:10:28    阅读次数:252
387条   上一页 1 ... 11 12 13 14 15 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!