上一页 1 2 3 4 5 6 7 8 ··· 94 下一页

2014年2月3日

POJ 2337 Catenyms (有向图欧拉路径,求字典序最小的解)

摘要: CatenymsTime Limit:1000MSMemory Limit:65536KTotal Submissions:8756Accepted:2306DescriptionA catenym is a pair of words separated by a period such that the last letter of the first word is the same as the last letter of the second. For example, the following are catenyms:dog.gophergopher.ratrat.tiger 阅读全文

posted @ 2014-02-03 13:51 kuangbin 阅读(2752) 评论(0) 推荐(0) 编辑

POJ 1637 Sightseeing tour (混合图欧拉路判定)

摘要: Sightseeing tourTime Limit:1000MSMemory Limit:10000KTotal Submissions:6986Accepted:2901DescriptionThe city executive board in Lund wants to construct a sightseeing tour by bus in Lund, so that tourists can see every corner of the beautiful city. They want to construct the tour so that every street i 阅读全文

posted @ 2014-02-03 12:41 kuangbin 阅读(3492) 评论(2) 推荐(0) 编辑

SGU 101 Domino (输出欧拉路径)

摘要: 101. Dominotime limit per test: 0.25 sec.memory limit per test: 4096 KBDominoes – game played with small, rectangular blocks of wood or other material, each identified by a number of dots, or pips, on its face. The blocks usually are called bones, dominoes, or pieces and sometimes men, stones, or ev 阅读全文

posted @ 2014-02-03 11:18 kuangbin 阅读(1219) 评论(0) 推荐(0) 编辑

2014年1月31日

SGU 275. To xor or not to xor (高斯消元法)

摘要: 题目链接:http://acm.sgu.ru/problem.php?contest=0&problem=275题意:给你n个数,可以选择任意个数异或,但是要使得最后的异或值最大。我们把每个数用二进制表示,要使得最后的异或值最大,就是要让高位尽量为1,高位能不能为1就必须用高斯消元判断了。1. 根据数的二进制表示,建立方程组的矩阵,结果那列置为1。2. 从下往上高斯消元(高位放下面),如果该行有未被控制的变元,则该行的结果一定为1,且该变元控制该行。3. 从该行往上依次消掉(异或)该变元。4. 如果该行没有可以用来控制的变元,如果最后一列是0,则该行结果也为1,否则该行结果为0。这里能 阅读全文

posted @ 2014-01-31 01:17 kuangbin 阅读(1793) 评论(0) 推荐(0) 编辑

2014年1月21日

SGU 200. Cracking RSA (高斯消元求自由变元个数)

摘要: 题目链接:http://acm.sgu.ru/problem.php?contest=0&problem=200200. Cracking RSAtime limit per test: 0.25 sec.memory limit per test: 65536 KBinput: standardoutput: standardThe following problem is somehow related to the final stage of many famous integer factorization algorithms involved in some crypto 阅读全文

posted @ 2014-01-21 13:25 kuangbin 阅读(2010) 评论(0) 推荐(0) 编辑

2014年1月5日

HDU 4815 Little Tiger vs. Deep Monkey(2013长春现场赛C题)

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4815简单的DP题。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 using namespace std;12 const int MAXN = 40010;13 double dp[2][MAXN];14 int a[MAXN];15 int main()16 {17 //freopen("i... 阅读全文

posted @ 2014-01-05 23:37 kuangbin 阅读(869) 评论(0) 推荐(0) 编辑

HDU 4821 String(2013长春现场赛I题)

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4821字符串题。现场使用字符串HASH乱搞的。枚举开头! 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 using namespace std; 12 13 int HASH; 14 const int MAXN = 100010; 15 int now ; 16 struct H... 阅读全文

posted @ 2014-01-05 23:35 kuangbin 阅读(1950) 评论(0) 推荐(0) 编辑

HDU 4813 Hard Code(水题,2013年长春现场赛A题)

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4813签到题。把一个字符串按照格式输出就可以了,很水 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 using namespace std;12 int main()13 {14 //freopen("in.txt","r",stdin);15 //freopen("ou 阅读全文

posted @ 2014-01-05 23:31 kuangbin 阅读(970) 评论(0) 推荐(0) 编辑

HDU 4818 Golden Radio Base (2013长春现场赛B题)

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4814进制转换。现场根据题目给的两个公式,不断更新!!!胡搞就可以了。现场3A,我艹,一次循环开大TLE,一次开小WA,太逗了,呵呵现场源码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 using namespace std;12 int a[200];13 int main()14 {15 ... 阅读全文

posted @ 2014-01-05 23:29 kuangbin 阅读(1035) 评论(0) 推荐(0) 编辑

HDU 4816 Bathysphere (2013长春现场赛D题)

摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=48162013长春区域赛的D题。很简单的几何题,就是给了一条折线。 然后一个矩形窗去截取一部分,求最大面积。现场跪在这题,最后时刻TLE到死,用的每一小段去三分,时间复杂度是O(n log n) , 感觉数据也不至于超时。卧槽!!!!代码拷回来,今天在HDU一交,一模一样的代码AC了,加输入外挂6s多,不加也8s多,都可AC,呵呵·····(估计HDU时限放宽了!!!)现场赛卡三分太SXBK了,我艹!!!! 好好的一个现场赛绝杀错过了。以下是现场赛源 阅读全文

posted @ 2014-01-05 22:48 kuangbin 阅读(1191) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 94 下一页

导航

JAVASCRIPT: