c语言练习
bllddee
这个作者很懒,什么都没留下…
展开
-
数字识别
#include <opencv2/opencv.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <string> #include <io.h> #include <vector> #include <iostream> #include <fstream> using namespace cv; using namespace std;原创 2017-10-21 11:04:38 · 575 阅读 · 0 评论 -
每天一点C语言--竖式问题
这里是《剑指offer》PDF下载链接,欢迎一起进步的同学下载学习! 剑指offer高清完整版PDF下载 找出所有形如abc*de的算式,使得在完整的竖式中,所有数字都属于一个特定的数字集合。输入数字集合(相邻无空格),输出所有竖式。每个竖式前有标号,后有空行,最后输出解的总数。 例如: 输入: 2357 输出: <1> ..775 X..33原创 2017-09-19 15:49:19 · 1526 阅读 · 0 评论 -
每日一点C语言--蛇形填数
在n*n的方阵里填入1,2,…, n*n, 要求填成蛇形。例n=4时方阵为: ~ ~ ~ ~ 10 11 12 1 9 16 13 2 8 15 14 3 7 6 5 4 #include <stdio.h> #include <string.h> #define maxn 20 int a [maxn][maxn]; in原创 2017-09-18 08:33:47 · 707 阅读 · 0 评论 -
每日一点C语言--开灯问题
开灯问题 有n盏灯,编号1-n, 第一个人将所有灯都打开,第二个人按下所有2的倍数的开关,第三个人按下所有3的倍数的开关,以此类推,一共k个人,问最后哪些灯是开着的? #include <stdio.h> #include <string.h> #define maxn 1010 int a[maxn]; //较大的数组声明在函数之外 int main(){ int原创 2017-09-17 10:12:57 · 1648 阅读 · 0 评论