Fork me on GitHub

  2013年1月12日
摘要: 用整形数组保存数据,每一位最后在0~9范围之内。#include "cstdio"#include "cstring"#include "cstdlib"int res[10010];int main(){ int n; while (scanf("%d", &n) == 1) { int i, j; memset(res, 0, sizeof(res)); res[0] = 1; res[1] = 1; for (i = 2; i <= n; i++) { for (j... 阅读全文
posted @ 2013-01-12 19:27 huashiyiqike 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 1 #include "stdio.h" 2 #include "stdlib.h" 3 #include "string.h" 4 #include "math.h" 5 typedef struct stu 6 { 7 char num[100];//尽量开大数组 8 char name[100]; 9 char sex[3];10 int age;11 }stu;12 int main()13 {14 int n,m,exist;15 int i,j;16 char temp[100];17 stu *a=( 阅读全文
posted @ 2013-01-12 13:16 huashiyiqike 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1 #include "stdio.h" 2 #include "stdlib.h" 3 #include "string.h" 4 #include <iostream> 5 using namespace std; 6 typedef struct student 7 { 8 int age,grade; 9 char a[100];10 }student;11 int main()12 {13 int n,i,visit[10000],min,record,j;14 student *s=(student*)mall 阅读全文
posted @ 2013-01-12 09:24 huashiyiqike 阅读(167) 评论(0) 推荐(0) 编辑