
暴力枚举
文章平均质量分 79
nianiajr
http://www.liangjiarui.com/
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
uva 131 -The Psychic Poker Player(德州扑克)
G - The Psychic Poker Player Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Appoint description: System Crawler (2013-05-30) Description原创 2013-08-05 11:42:58 · 1536 阅读 · 0 评论 -
uva 10167--birthday cake
Background Lucy and Lily are twins. Today is their birthday. Mother buys a birthday cake for them.Now we put the cake onto a Descartes coordinate. Its center is at (0,0), and the cake's length of r原创 2013-08-05 11:29:27 · 845 阅读 · 0 评论 -
uva 146 ID Codes
B - ID Codes Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Appoint description: System Crawler (2013-05-30) Description ID C原创 2013-08-05 11:33:57 · 728 阅读 · 0 评论 -
uva 331
F - Mapping the Swaps Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Appoint description: System Crawler (2013-05-30) Description原创 2013-08-06 17:30:56 · 731 阅读 · 0 评论 -
uva 639
D - Don't Get Rooked Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Appoint description: System Crawler (2013-05-30) Description原创 2013-08-06 17:18:50 · 738 阅读 · 0 评论 -
hdu 4628 Pieces
今天就只做了一个题,还是看了别人题解的,诶,看来真的下苦功夫好好学习,要不然永远那么小白,这个题我是想到要枚举的,但不知道如何去枚举,后面看到别人的代码才知道有一种枚举子集的算法,复杂度好像是o(n^3),大概就是用二进制模拟几何,1,代表该位置数存在,0代表不存在使用假如一个集合为sn,有n个元素,那么总共有2^n-1个非空子集,也用整数代替集合1-2^n-1来代替这些集合,那么如何替代呢,su原创 2013-08-24 19:48:01 · 715 阅读 · 0 评论 -
uva 10132 File Fragmentation
这个题挺恶心,弄了不少时间,大概意思是有2n个文件碎片,他们都是从原来的一模一样的n个文件拆成两半形成的,要你根据这些碎片确定原来文件,一开始就应该能想到要把这些碎片长度从小到大排个序,然后我就天真的以为最短+最长的应该就是了,确实没错,但这里有个问题就是如果最短和最长的文件都有多个,那么问题就出来了,这里就必须得用枚举,来确定原文件碎片,不过这个题目数据有点水,只要把文件长度排序后,找到最长和最原创 2013-08-15 16:10:40 · 763 阅读 · 0 评论 -
Herding
这题其实很简单的,就是找任意三点选出面积最小三角形,手贱把叉乘-写成+小半天没发现。。。,热身赛题目确实有点水哈,让我这样的小白也能独自做一下,倍感欣慰。 #include #include #include using namespace std; const double eps=1e-8; const double INF=100000000.0; struct point{原创 2013-09-08 23:38:25 · 852 阅读 · 0 评论 -
usaco crypt1
简单的暴力题,由于数规模固定,把所有情况考虑到就好了。 /* ID: ljracm1 LANG: C++ PROB: crypt1 */ #include #include #include #define T using namespace std; int vis[12],n; bool judge(int num){ while(num){ int d=n原创 2014-04-29 22:23:13 · 767 阅读 · 0 评论