摘要:
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=1485View Code 1 #include<stdio.h> 2 #include<string.h> 3 int judge(int n) 4 { 5 int a[10] ; 6 memset(a, 0, sizeof(a)) ; 7 int m = 1 ; 8 for(int i=0; i<4; i++) 9 {10 if(a[(n/m)%10]==0)11 {12 ... 阅读全文
posted @ 2013-03-06 22:14
yelan@yelan
阅读(181)
评论(0)
推荐(0)
摘要:
http://poj.org/problem?id=3169View Code 1 #include<iostream> 2 #include<cstring> 3 using namespace std; 4 5 const int MAXN=1010; 6 const int M=20020; 7 const int INF=0x3f3f3f3f; 8 int head[MAXN];//每个结点的头指针 9 int vis[MAXN];//在队列标志 10 int cnt[MAXN];//每个点的入队列次数 11 int que[MAXN];//SPFA循环指针 1 阅读全文
posted @ 2013-03-06 19:28
yelan@yelan
阅读(161)
评论(0)
推荐(0)

浙公网安备 33010602011771号