摘要: 问题描述 100 可以表示为带分数的形式:100 = 3 + 69258 / 714。 还可以表示为:100 = 82 + 3546 / 197。 注意特征:带分数中,数字1~9分别出现且只出现一次(不包含0)。 类似这样的带分数,100 有 11 种表示法。 输入格式 从标准输入读入一个正整数N 阅读全文
posted @ 2020-01-31 15:13 Tomorrow1126 阅读(213) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include<cstdio> using namespace std; #define maxn 105 char field[maxn][maxn]; int n,m; void dfs(int x,int y) { field[x][y]='.';// 阅读全文
posted @ 2020-01-31 14:28 Tomorrow1126 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 用二维数组存二叉树 思路1:两个数组分别存左儿子和右儿子的编号,一个数组用来存值 #include<iostream> #include<cstdio> #include<sstream> #include<cstring> using namespace std; const int maxn = 阅读全文
posted @ 2020-01-31 14:09 Tomorrow1126 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 输入不确定数量的数字。 cin >> x; while (cin.get() != '\n') { cin >> x; } cin.peek()的返回值是一个char型的字符,其返回值是指针指向的当前字符,但它只是观测指针停留在当前位置并不后移;如果要访问的字符是文件结束符,则函数值是EOF(-1) 阅读全文
posted @ 2020-01-31 13:47 Tomorrow1126 阅读(392) 评论(0) 推荐(0) 编辑
摘要: 闰年 是4的倍数,不是100的倍数或者是400的倍数 阅读全文
posted @ 2020-01-31 13:33 Tomorrow1126 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 1、填空题求解方式不限,暴力,手算,计算器,excel,查windows日历等等。 2、程序填空题基本上是递归,找找有几个调用自身的语句 3、编程题不能空着,尽量想最优解,想不出就用暴力,实在不会,直接写输入输出样例结果。 阅读全文
posted @ 2020-01-31 13:29 Tomorrow1126 阅读(815) 评论(0) 推荐(0) 编辑