上一页 1 ··· 9 10 11 12 13 14 下一页
摘要: 时间限制:0.75s空间限制:6M题意 n*n(n>1; r同理,即rint n, sum, max, k, m;void dfs (int line , int row, int l, int r, int k) { int pos, p, i; if (line > n){ ... 阅读全文
posted @ 2014-07-09 15:14 keambar 阅读(232) 评论(0) 推荐(0)
摘要: 时间限制:0.25s空间限制:4M题意: 给出一个n个节点,m条边的图,每条边都有标记了编号为1,2,3三种颜色之一,现在求从1号节点到n号节点的一条最短路径的长度,要求该路径中相邻的边没有相同的颜色。Solution: 有限制条件的SPFA,要注意有时要走环来改变路径颜色,才能到达... 阅读全文
posted @ 2014-07-09 14:08 keambar 阅读(367) 评论(0) 推荐(0)
摘要: SGU链接:时间限制:0.25s空间限制:4M题意: 给出一个树(节点数#include #include #include #include #include #define INF 16666using namespace std;struct node { int v, ne;} edge... 阅读全文
posted @ 2014-07-09 13:56 keambar 阅读(314) 评论(0) 推荐(0)
摘要: 时间限制:0.25s空间限制:4M题意: 在 n*n(n≤10)的棋盘上放 k (k#include #define LL long longusing namespace std;int powT[11];int statu[1 > 1) ) == 0) && ( (i & (i 0; t ... 阅读全文
posted @ 2014-07-08 21:31 keambar 阅读(368) 评论(0) 推荐(0)
摘要: http://www.cnblogs.com/keam37/ keam所有 转载请注明出处本文将分别从,,,4个头文件介绍包含在其中的函数的用法.#inclde cin,cout,cerr是最基本的输入输出流 ,通过运算符">”操作 例如从键盘读入两个字符串,再将其合并输出string s1,s2;... 阅读全文
posted @ 2014-05-24 01:33 keambar 阅读(3548) 评论(1) 推荐(0)
摘要: Description In a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their destinations without crashing into each other. Of course, a... 阅读全文
posted @ 2014-05-24 01:00 keambar 阅读(220) 评论(0) 推荐(0)
摘要: DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: q By an integer sequence P = p1 p2...pn... 阅读全文
posted @ 2014-05-24 00:45 keambar 阅读(165) 评论(0) 推荐(0)
摘要: 直接上分析:首先 弄清各种大写字母的操作的实质K 明显 是 and &A 是 or |N 是 not !C 由表格注意到 当 w#include #include #define Det 112using namespace std;int val[5];string st;stack inte;... 阅读全文
posted @ 2014-05-24 00:25 keambar 阅读(200) 评论(0) 推荐(0)
摘要: DescriptionAccounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for preparing annual report for MS Inc. Al... 阅读全文
posted @ 2014-05-24 00:11 keambar 阅读(190) 评论(0) 推荐(0)
摘要: Description Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, ... 阅读全文
posted @ 2014-05-23 23:53 keambar 阅读(279) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 下一页