随笔分类 - ACM — 暴力枚举
摘要:http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2037&pid=5【题解】:没想通这题暴力可以过。。。。【code】: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int arr[100010]; 7 8 int main() 9 {10 int n,m;11 while(~scanf("%d%d",&n,&m))12 {13 int i,j;14 for(i=0;im)20 ...
阅读全文
摘要:http://www.bnuoj.com/bnuoj/problem_show.php?pid=20832【题意】:给你一串字符串,求一个ST(0 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 int getST(char *names)11 {12 int a[100];13 int len = strlen(names);14 int i;15 int ST;16 int b[1000],cnt=0;17 f...
阅读全文
摘要:http://poj.org/problem?id=1679The Unique MSTTime Limit:1000MSMemory Limit:10000KTotal Submissions:17726Accepted:6150DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning t
阅读全文
摘要:http://ac.nbutoj.com/Problem/view.xhtml?id=1173[1173] Birdlike Angry Pig时间限制: 1000 ms 内存限制: 65535 K问题描述There's no end to revenge. Pigs like to eat birds' eggs, so birds decide to revenge. For this, pigs decide to revenge as well. Pigs give a task to a birdlike pig. They let he sneak into the
阅读全文

浙公网安备 33010602011771号