Skip to content

Commit

Permalink
update for 2020
Browse files Browse the repository at this point in the history
  • Loading branch information
fengzgPolyvi committed Feb 17, 2020
0 parents commit 47a8576
Show file tree
Hide file tree
Showing 23 changed files with 342 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.DS_Store
*.o
*.a
*.exe

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/

# Visual Studio 2015/2017 cache/options directory
.vs/

# Visual Studio 2017 auto generated files
Generated\ Files/

# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
5 changes: 5 additions & 0 deletions C语言学习笔记.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# C语言学习笔记

# 记录你学习过程中的所见所思!酸甜苦辣!

# 看什么看! 赶紧填坑啊!
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Mark Feng

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
72 changes: 72 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# c2020

## 基本操作流程

1.[https://github.com/luckymark/c2020](https://github.com/luckymark/c2020) fork 到你自己的 github 中
2. 创建本地仓库:(如果用机房的电脑,则建议 clone 到 U 盘,便于携带)

```
git clone https://github.com/ **YourGithubAccount** /c2020
cd c2020
ls
git config user.name=???
git config user.email=???
git remote -v
git remote add upstream https://github.com/luckymark/c2020
```

3. 修改、提交代码:

```
git status
git add .
git commit -m "完成了running letter"
git push
```

4.https://github.com/luckymark/c2020 获取更新

```
git fetch upstream
git merge upstream/master
```

[在 github 网页上更新的方法](https://www.zhihu.com/question/20393785/answer/30725725)

[fork 后如何同步源的新更新](https://segmentfault.com/q/1010000002590371)

5. 请求老师 review 代码的方法:在 github 网页上发起一个 PR(pull request)即可

## [作业](https://github.com/luckymark/c2020/tree/master/practices)

1. level0 可选,用于还不够熟练的同学练手(嫌题目太少的同学,那就刷刷咱[神技大学的 OJ](http://acm.uestc.edu.cn/#/)吧,从低到高地刷哈)
2. level1 必做,课堂+课后练习
3. level2 可选,供精力旺盛到变态的大神们发泄之用

## 参考

### IDE:

- 推荐JetBrains的[CLion](https://www.jetbrains.com/clion/) 申请免费的License点[这里](https://www.jetbrains.com/community/education/)

### GIT

[史上最浅显易懂的 Git 教程! 廖雪峰](http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000)

[Pro Git(中文版)](http://git.oschina.net/progit/)

[撸袖子 动手学 Git 专治菜鸟](http://igit.linuxtoy.org/contents.html)

[Git 远程操作详解 阮一峰](http://www.ruanyifeng.com/blog/2014/06/git_remote.html)

[fork 后如何跟上源 repo 的变化](https://segmentfault.com/q/1010000002590371)

### Markdown

[Markdown 入门指南](http://www.jianshu.com/p/1e402922ee32)

### 其他

[免费的计算机编程类中文书籍](https://github.com/wwj718/free-programming-books-zh_CN)
48 changes: 48 additions & 0 deletions level0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
### C0

1. 打印 “Hello world!I'm 某某某!”

### C1

1. 判断数的正负、判断是否为偶数
1. 判断一个数是否是13的倍数
1. 判断闰年
1. 从2个整数中,找出最大的那个数
1. 从3个整数中,找出最大的那个数
1. 从n个整数中,找出最大的那个数

### C2
1. 说1万遍“你好!”
2. 尝试以下代码的运行效果(windows环境下):

```
system("color 0a");
while(1){
printf("0 1");
}
```

3. 尝试以下代码的运行效果:

```
system("color 0a");
while(1){
printf("%d\t",rand()/1000);
}
```

4. 打印2-100的所有偶数
5. 打印所有1-100,能被3整除,但不能被5整除的数
6. 打印1-100,是7的倍数,或者尾数为7的所有数,并打印这些数的总和
7. 打印一个九九表
8. 输入n个数,并将它们逆序输出
9. 输入5个0-9的数,输出0-9中没有出现过的数
10. 输入5个0-9的数,输入的数从小到大排序(排序方法不限,但鼓励尝试下“桶排序”,不知道什么是“桶排序”的话,可以google之)

### C3
1. 编写一个函数,计算数组的和
1. 编写一个阶乘函数
1. 编写一个斐波那契函数
1. 编写一个函数,判断三角形是否为直角三角形
1. 编写一个函数,判断2个矩形是否有重叠(即游戏中常用的碰撞检测函数)
1. 编写一个函数,将美元换算为人民币
10 changes: 10 additions & 0 deletions level0/bubbleSort/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### 题目:冒泡排序

### 功能要求:

1. 采用冒泡算法实现一个排序算法
1. 构造一个正整数数组,测试该冒泡算法
1. 测试不同情况下的执行时间

### 参考:
[冒泡排序-百度百科](http://baike.baidu.com/link?url=mk5B_WaNbOLIbgx-pjQ45OkfTe14BCxcz1C6ZS86AsAduhwNKFM_Q3kqIK-6a6VDh6XKpd-VW8PR1IvaU1FhYTUqqnh5n4ovRUALgFvGox3nEmhkpALdhpvYxfbTkLGpDL90SiatgfuWCWujleIA8E3FUL3qJmC0TnEQN7kD1fHxmhq6uZeVXeTNfxlURvAd)
10 changes: 10 additions & 0 deletions level1/p01_runningLetter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### 题目:奔跑的字母

### 功能要求:

1. 在console上输出一个字母(或单词)
1. 使该字母或单词,按一定速度从左至右运动
1. 当遇到屏幕边界时反向运动



4 changes: 4 additions & 0 deletions level1/p02_isPrime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### 功能要求:

1. 任意输入一个正整数n
1. 判断n是否为素数
17 changes: 17 additions & 0 deletions level1/p03_Diophantus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### 编程解决下面的问题:

取自《希腊诗选》(Greek Anthology):

丢番图的童年经过了他一生的六分之一,

青年经过了十二分之一,

又有七分之一的时间是单身汉。

结婚五年后得了个儿子,

儿子比父亲先死四年,

年级是他的一半。

问儿子死时丢番图多大?
7 changes: 7 additions & 0 deletions level1/p04_ narcissus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### 功能要求:

1. 打印出所有3位水仙花数

水仙花数:n位数的每个数位的n次方之和等于该n位数本身

例如:153=1^3+5^3+3^3
5 changes: 5 additions & 0 deletions level1/p05_allPrimes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### 功能要求:

1. 打印2-1000以内的所有素数
1. 打印出总的计算时间
1. 尽可能优化算法的效率
3 changes: 3 additions & 0 deletions level1/p06_Goldbach/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### 功能要求:

1. 在100范围内验证哥德巴赫猜想的正确性
3 changes: 3 additions & 0 deletions level1/p07_encrypt_decrypt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### 功能要求:

1. 分别编写“加密”、“解密”函数,输入为任意长度的字符串
5 changes: 5 additions & 0 deletions level1/p08_hanoi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### 功能要求:

1.汉诺塔:汉诺塔(又称河内塔)问题是源于印度一个古老传说的益智玩具。大梵天创造世界的时候做了三根金刚石柱子,在一根柱子上从下往上按照大小顺序摞着64片黄金圆盘。大梵天命令婆罗门把圆盘从下面开始按大小顺序重新摆放在另一根柱子上。并且规定,在小圆盘上不能放大圆盘,在三根柱子之间一次只能移动一个圆盘。

![](./hanoi.jpg)
Binary file added level1/p08_hanoi/hanoi.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions level1/p09_maze/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### 题目:迷宫小游戏(基于console)

### 功能要求:

1. 在控制台上显示一个迷宫,包括:墙、玩家、出口等;
1. 通过上下左右键,控制玩家行走;
1. 当玩家到达出口,则显示玩家赢得了游戏;
9 changes: 9 additions & 0 deletions level1/p10_pushBoxes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### 题目:推箱子小游戏(基于console)

### 功能要求:

1. 将p09迷宫游戏改造为“推箱子”游戏;
1. 在地图中增加箱子、箱子目标位置等图形;
1. 当玩家将所有箱子归位,则显示玩家赢得了游戏;
1. 按玩家走动步数记分;
1. 设计多个关卡,每一关的地图从文件中读取,玩家每关的分数记录到文件中;
14 changes: 14 additions & 0 deletions level1/p11_linkedList/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### 题目:单向链表

### 功能要求:

1. 在 main 函数中创建一个单向链表;
1. 遍历该链表,依次现实各节点的 value;
1. 将该链表所有节点反序;
1. 在该链表中查找第一个值为 5 的节点,如果找到则返回该节点的序号,否则返回-1;
1. 查找下一个值为 5 的节点,返回值同上;

### 技能强化(彻底搞定指针):

欢迎大神们都去玩玩这个:
[Level2-实现 SkipList 算法](../../level2/SkipList/Readme.md)
11 changes: 11 additions & 0 deletions level1/p12_warehouse/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### 题目:简单进销存

### 功能要求:

1. 实现如下的菜单(按数字选择菜单功能):
- 显示存货列表
- 入库
- 出库
- 退出程序
1. 实现菜单对应功能(需记录货物的型号、数量等信息);
1. 程序启动时从文件中读取当前库存数据,退出时保存库存数据;
11 changes: 11 additions & 0 deletions level2/GA/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### 题目:寻径GA(遗传算法)

### 要求:

1. 任意给出一个迷宫地图(参见level1/p09_maze),采用GA实现一个算法,寻找最佳路径
1. 绘制出最佳路径
1. 打印运算时间

### 参考:

[遗传算法入门](http://blog.csdn.net/zzwu/article/details/561577)
10 changes: 10 additions & 0 deletions level2/NeuralNetworks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### 题目:数字识别 & 神经网络

### 要求:

1. 在一个8*8的点阵中绘制(模拟)手写的数字
1. 设计并训练一个神经网络,以识别手写的数字

### 参考:

[神经网络入门](http://blog.csdn.net/zzwu/article/details/574931)
11 changes: 11 additions & 0 deletions level2/PI/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### 题目:PI(2014级陈飞宇大神挖坑)

### 要求:

1. 计算PI,精度>1万位(够黑啊!)
1. 打印总时间
1. 打印内存消耗的最大值

### 参考:

[2014级柱神作品](https://github.com/holdzhu/uestc2015ccpp/tree/master/Pi) (做完本题后再看啊!!!)
5 changes: 5 additions & 0 deletions level2/SkipList/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### 题目:SkipList

### 功能要求:

1. 实现[SkipList算法](https://zhuanlan.zhihu.com/p/33674267)

0 comments on commit 47a8576

Please sign in to comment.