摘要:
最长上升路径Time Limit: 3 SecMemory Limit: 128 MB Submissions: 103Solved: 15Description给定n个顶点m条边的有向图,每一条边上都有一个正整数权值。一条有向路径被称为上升路径当且仅当除了路径上第一条边外,每一条表上的权值都严格大于路径上前一条边的权值。路径长度定义为路径所包含的边数,求给定图中最长上升路径长度。Input第一行是测试数据组数k。接下来是k组测试数据。每组数据开始为n(n 2 #include 3 #include 4 #include 5 #include 6 #include 7 #includ... 阅读全文
posted @ 2013-11-27 18:33
HaibaraAi
阅读(344)
评论(0)
推荐(0)
摘要:
C. Sereja and Algorithmtime limit per test1 secondmemory limit per test256 megabytes这道题没出来真的是自己,啊改了一点就没管了,结果xx也可以的哎- -,当时也用种情况交过,去掉特判后又忘记加t 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 13 using namespace std;14 #define INF ... 阅读全文
posted @ 2013-11-27 03:33
HaibaraAi
阅读(140)
评论(0)
推荐(0)
摘要:
这个虽然看过很多遍了,但是还是看着想笑,有时候真的想问问自己为什么这么菜,血流得还不够?劳资六年前开始搞ACM啊!!!!!!!!!! 从此踏上了尼玛不归路啊!!!!!!!!!!!! 谁特么跟劳资讲算法是程序设计的核心啊!!!!!! 尼玛除了面试题就没见过用算法的地方啊!!!!!! 谁再跟劳资讲算法之美算法的力量,劳资一本算法导论拍死你啊!!!!!!!! 那是搞ACM的入门书啊!!!!特么的入门书就一千多页啊!!!!!!! 还没有习题答案啊,学完了你特么都不知道自己到底会不会啊有木有!!!!!! 然后你就得看lrj的黑书啊!!!!!!还是特么的没有习题答案啊!!!! 那书难的一B啊!!!!人家一 阅读全文
posted @ 2013-11-27 02:48
HaibaraAi
阅读(346)
评论(0)
推荐(0)
摘要:
还以为就这么点分了,不会跪了,起码有点加,生活都这么艰难了,为什么不让我好好地活下去!是不是世界对我充满了恶意!当然还是自己太菜!B题没初始化第一个就杯具了一次C题大概的弄出来了,调了半个小时,感觉不用心一样,虽然最后还是有了新bug的发现可是也来不及了!妈蛋,现在看早就是对了的了, 一没看清就交了,判断去掉了,条件都不记得加! 阅读全文
posted @ 2013-11-27 02:21
HaibaraAi
阅读(156)
评论(0)
推荐(0)
摘要:
B. Sereja and Suffixestime limit per test1 secondmemory limit per test256 megabytesSereja has an array a, consisting of n integers a1, a2, ..., an. The boy cannot sit and do nothing, he decided to study an array. Sereja took a piece of paper and wrote out m integers l1, l2, ..., lm (1 ≤ li ≤ n). For 阅读全文
posted @ 2013-11-27 01:46
HaibaraAi
阅读(107)
评论(0)
推荐(0)
摘要:
A. Sereja and Coat Racktime limit per test1 secondmemory limit per test256 megabytesSereja owns a restaurant for n people. The restaurant hall has a coat rack with n hooks. Each restaurant visitor can use a hook to hang his clothes on it. Using the i-th hook costs ai rubles. Only one person can hang 阅读全文
posted @ 2013-11-27 01:44
HaibaraAi
阅读(158)
评论(0)
推荐(0)
浙公网安备 33010602011771号