摘要: #includestatic int arr[100];void main(){ void solve(int people,int spacing); int people,spacing,i,j=0; printf("请输入总人数(2-99):"); scanf("%d",&people); p... 阅读全文
posted @ 2015-01-09 19:01 zach96 阅读(131) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std;int arry[13]= {0,31,28,31,30,31,30,31,31,30,31,30,31};bool is_bisse(int year){ if((year % 4 == 0 && ... 阅读全文
posted @ 2015-01-09 18:59 zach96 阅读(152) 评论(0) 推荐(0) 编辑
摘要: #include int main(){ int n,i; int a[45]={2,3}; scanf("%d",&n); for (i=2;iusing namespace std;int main(){ int i; __int64 n,fib[45] = ... 阅读全文
posted @ 2015-01-09 18:57 zach96 阅读(396) 评论(0) 推荐(0) 编辑
摘要: #includeint leap(int year){ int leap; leap=year%4==0&&year%100!=0||year%400==0; return (leap);}int main(){ int mon[]= {0,28,31,30,31,30,31... 阅读全文
posted @ 2015-01-09 18:55 zach96 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 #define mod 1003 6 7 int quick_power(int a, int b) 8 { 9 if(a == 0) return 0;10 int ret... 阅读全文
posted @ 2015-01-09 18:54 zach96 阅读(126) 评论(0) 推荐(0) 编辑
摘要: #include #include int main(){ char a[101],b[101]; int i,j,k,cas,count=1,num2,num3; scanf("%d",&cas); getchar(); while (cas--) { ... 阅读全文
posted @ 2015-01-09 18:53 zach96 阅读(121) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std;long long a[1000001];char c[1000001];int main(){ int i=2; cin>>a[1]; int ans=0; while(scanf("%c",&c[i++])!=EOF) s... 阅读全文
posted @ 2015-01-09 18:52 zach96 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 注意:只有一个鞍点可证#includeint main(){ int i,j,k,max,maxj,flag; //int a[3][4]={{1,2,3,4},{5,6,7,8},{9,10,11,12} }; int a[3][4]={{1,2,3,13},{5,6,8,7},... 阅读全文
posted @ 2015-01-09 18:51 zach96 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #include float p(int n,float x){ if(n==0) return (1); else if(n==1) return (x); else return (((2*n-1)*x-p((n-1),x)-(n-1)*p((n-2),x))... 阅读全文
posted @ 2015-01-09 18:50 zach96 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 这个问题挺有名的,贴代码:#include "stdio.h"void main( ){ //FILE *fp; int i=1; double x=500.0,s=1000.0,oil; //fp=fopen("data.dat","w"); do { //fprintf(fp,"No=%-7d... 阅读全文
posted @ 2015-01-09 18:49 zach96 阅读(173) 评论(0) 推荐(0) 编辑