摘要:
#include #include using namespace std;int main(){ double a,b,c,d,e,f,t; while(cin>>t){ if(t==0) break; else { while(t--) ... 阅读全文
posted @ 2014-12-17 11:34
__夜风
阅读(135)
评论(0)
推荐(0)
摘要:
#include int main(){ int a,b; while(scanf("%d%d",&a,&b)!=EOF) { if((a+b)%86==0) puts("yes"); else puts(... 阅读全文
posted @ 2014-12-17 11:33
__夜风
阅读(85)
评论(0)
推荐(0)
摘要:
#includeusing namespace std;int main(){ int a,i,b,t,k; while(cin>>a>>b,a,b){ t=a*100; k=0; for(i=0;i#includeusing namespace std;int m... 阅读全文
posted @ 2014-12-17 11:32
__夜风
阅读(147)
评论(0)
推荐(0)
摘要:
#includeusing namespace std;void main(){ int t,s,n,m,k; int qhs(int); cin>>k; while(cin>>n,cin>>m,k--){ t=qhs(n); //s=qhs(... 阅读全文
posted @ 2014-12-17 11:30
__夜风
阅读(178)
评论(0)
推荐(0)
摘要:
水题 AC代码: #include #include using namespace std;struct p{ int endd,start;};p p1[1000];bool cmp(p p1,p p2){ return p1.endd>t&&t) { for... 阅读全文
posted @ 2014-12-17 11:30
__夜风
阅读(114)
评论(0)
推荐(0)
摘要:
水题 AC代码: #includeusing namespace std;int main(){ float n,m,x,y,x1,y1,x2,y2; while(cin>>n,n){ double sum=0.0; cin>>x>>y; x1=x,y1=y... 阅读全文
posted @ 2014-12-17 11:29
__夜风
阅读(150)
评论(0)
推荐(0)
摘要:
水题 AC代码: #include using namespace std;int main(){ int i,j,n,k,a[100],b[100]; cin>>n; while(n--) { memset(a,0,sizeof(a)); m... 阅读全文
posted @ 2014-12-17 11:28
__夜风
阅读(155)
评论(0)
推荐(0)
摘要:
水题 AC代码: #include int main(){ int a[31][31]; int i,j,n; a[1][1]=a[2][1]=a[2][2]=1; for(i=3;i<=30;i++) { ... 阅读全文
posted @ 2014-12-17 11:27
__夜风
阅读(143)
评论(0)
推荐(0)
摘要:
水题 AC代码: #includeusing namespace std;int main(){ int i,j,b[1000],k; while(cin>>i>>j) { int a=0; if(i=0;k--) if(b[k]>9) ... 阅读全文
posted @ 2014-12-17 11:27
__夜风
阅读(158)
评论(0)
推荐(0)
摘要:
水题 AC代码: #include#includeusing namespace std;int main(){ int i,j,T; char a[100]; cin>>T; while(cin>>a,T--) { j=strlen(a)-1; int... 阅读全文
posted @ 2014-12-17 11:25
__夜风
阅读(159)
评论(0)
推荐(0)
摘要:
水题 AC代码: #includeusing namespace std;int main(){ int gcd(int,int); int i,j,b=1; int a[1000]; while(cin>>j) { b=1; for(i=0... 阅读全文
posted @ 2014-12-17 11:24
__夜风
阅读(185)
评论(0)
推荐(0)
摘要:
水题 AC代码: #include using namespace std;int main(){ char a[100],*p; int max,i; while(cin>>a){ max=int(a[0]); p=a; for(i=0;a[i]!='\0'... 阅读全文
posted @ 2014-12-17 11:24
__夜风
阅读(140)
评论(0)
推荐(0)
摘要:
水题 AC代码: #include int main(){ int i,n,a[100]; while(scanf("%d",&n)!=EOF) { int max=0,min=99999999,sum=0; for(i=1;imax) max=a[i]; ... 阅读全文
posted @ 2014-12-17 11:21
__夜风
阅读(164)
评论(0)
推荐(0)
摘要:
水题 AC代码: #include using namespace std;int main(){ int i,m,n; while(cin>>n) { m=1; for(i=n-1;i>=1;i--) m=(m+1)*2; cout<<... 阅读全文
posted @ 2014-12-17 11:20
__夜风
阅读(175)
评论(0)
推荐(0)
摘要:
最小生成树模板题 简单的prim算法 AC代码: #include #include #define INF 9999999using namespace std;int map[200][200],dis[200],vis[200];int prim(int n){ int i,j,... 阅读全文
posted @ 2014-12-17 11:16
__夜风
阅读(169)
评论(0)
推荐(0)
摘要:
这个题目真心赞,入门经典啊!O(∩_∩)O哈哈哈~ hdu 1089#include #include #include #include #include using namespace std;int main(){ int a,b; while(cin>>a>>b) ... 阅读全文
posted @ 2014-12-17 11:11
__夜风
阅读(193)
评论(0)
推荐(0)
摘要:
水题 最长递增子序列和,dp更好 AC代码: #include #include #define MAX(a,b) a>b?a:busing namespace std;int main(){ int i,sum[1000],a[1000],n,j; while(cin>>n&&... 阅读全文
posted @ 2014-12-17 11:06
__夜风
阅读(120)
评论(0)
推荐(0)
摘要:
水题 AC代码: #include using namespace std;int main(){ int i,k,t,y,n; cin>>t; while(t--) { k=0; cin>>y>>n; for(i=y;;i+... 阅读全文
posted @ 2014-12-17 11:03
__夜风
阅读(215)
评论(0)
推荐(0)
摘要:
貌似之前也写过这个题目的解题报告。。。老了,记性不好 从贴一遍吧! 代码理解很容易 AC代码: #include #include #include using namespace std;#define N 8000int main(){ int i,j,k,t,n; int a[... 阅读全文
posted @ 2014-12-17 11:01
__夜风
阅读(161)
评论(0)
推荐(0)
摘要:
水题 栈运用的基础题 注释都在代码里 AC代码: #include#include#define max 100using namespace std;int main(){ stacks; int n,i,j,k,result[max];//n为列车个数, result数组用来表示... 阅读全文
posted @ 2014-12-17 10:56
__夜风
阅读(144)
评论(0)
推荐(0)
摘要:
水题 类似于斐波那契 AC代码: #include using namespace std;int main(){ int i,k,n; while(cin>>n) { int f0=1;int f1=2; int f3; for(i=2;i<=... 阅读全文
posted @ 2014-12-17 10:54
__夜风
阅读(128)
评论(0)
推荐(0)
摘要:
以前写过的,再贴出来看看。。。 素数环问题 预处理+搜索 AC代码: #include #include #include #include #include #include using namespace std;int out[30],n,flag[30];bool pr[40];i... 阅读全文
posted @ 2014-12-17 10:52
__夜风
阅读(125)
评论(0)
推荐(0)
摘要:
水题 AC代码: #include #include using namespace std;int main(){ int i,j,k,t,a[101]; while(cin>>t&&t) { k=0;j=0; for(i=1;i>a[i]; ... 阅读全文
posted @ 2014-12-17 10:49
__夜风
阅读(137)
评论(0)
推荐(0)
摘要:
#include using namespace std;#define MAXSIZE 20 typedef struct{ int key; char *otherinfo;}ElemType;typedef struct{ ElemType *r; ... 阅读全文
posted @ 2014-12-17 10:35
__夜风
阅读(255)
评论(0)
推荐(0)
摘要:
#include using namespace std;#define MAXSIZE 20 typedef struct{ int key; char *otherinfo;}ElemType;typedef struct{ ElemType *r; ... 阅读全文
posted @ 2014-12-17 10:35
__夜风
阅读(136)
评论(0)
推荐(0)
摘要:
#include using namespace std;#define MAXSIZE 20 typedef struct{ int key; char *otherinfo;}ElemType;typedef struct{ ElemType *r; ... 阅读全文
posted @ 2014-12-17 10:34
__夜风
阅读(137)
评论(0)
推荐(0)
摘要:
#include using namespace std;#define MAXSIZE 20 typedef struct{ int key; char *otherinfo;}ElemType;typedef struct{ ElemType *r; ... 阅读全文
posted @ 2014-12-17 10:33
__夜风
阅读(207)
评论(0)
推荐(0)

浙公网安备 33010602011771号