![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
暴搜
文章平均质量分 77
yan_____
不跟你介绍
展开
-
hdu 2514 Another Eight Puzzle 枚举
将8个数字填进图中,让相邻的点上的数字不相邻,8个数字全排列枚举即可要注意全排列的求法#includedo{………… }while(next_permutation(a,a+8));Another Eight PuzzleTime Limit : 2000/1000ms (Java/Other) Memory Limit : 3276原创 2013-01-25 14:30:28 · 1010 阅读 · 0 评论 -
uvalive4467
E - Electric BillTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit StatusDescriptionIt's year 2100. Electricity has become very expensive. Recently, yo原创 2013-04-07 00:14:16 · 720 阅读 · 0 评论 -
uva 10391复合词 字符串哈希
head的下标是哈希值,head[哈希值]=字符串的下标,拉链处理矛盾要注意字符串哈希值的取法#include#includechar st[121000][30],temp[30];int head[10000019],next[121000];int hash(char *str){ int seed=31,v=0; while(*str) {原创 2013-04-16 10:47:18 · 774 阅读 · 0 评论 -
uva 10317 调整等式中数字的位置使等式成立
uva 10317记录把等式移项后正数的位置,让这些正数之和等于sum/2,dfs搜索这些正数,再把剩余的数依次放入负数的位置,按照输入输出即可#include#include#include#define N 17int num[N],n,zh;int flag[N],end,sum;char ch[100];int ok;void dfs(int w,int t原创 2013-04-17 14:35:13 · 721 阅读 · 0 评论