
蓝桥杯13年
weixin_44714674
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
39级台阶
#include<stdio.h>int count=0;int sum=0;void xh(int n){ if(n==0) { if(sum%2==0) { count++; } return; } sum++; xh(n-1); sum--; if(n>=2) { sum++; xh(n-2);...原创 2020-02-11 19:15:29 · 108 阅读 · 0 评论 -
5前缀判断
题目标题:前缀判断如下的代码判断 needle_start指向的串是否为haystack_start指向的串的前缀,如不是,则返回NULL。比如:"abcd1234" 就包含了 "abc" 为前缀char* prefix(char* haystack_start, char* needle_start){char* haystack = haystack_start;char* n...原创 2020-02-11 19:14:19 · 146 阅读 · 0 评论 -
马虎的算式
暴力破解:五重循环#include<stdio.h>int main(){ int a,b,c,d,e,count=0; int m,n,x,y; for(a=1;a<=9;a++) for(b=1;b<=9;b++) for(c=1;c<=9;c++) for(d=...原创 2020-02-07 22:19:12 · 164 阅读 · 0 评论 -
高斯日记
高斯日记思路:天数减去四年(三个平年+一个闰年)的时间,年数加四年,直到天数小于四年的时间,再分情况讨论。注意1800年是平年。代码部分:#include<stdio.h>int main(){ int year=1777,month=4,day=30; int n; int i=0; int m1[12]={31,28,31,30,31,30,...原创 2020-02-07 21:39:15 · 144 阅读 · 0 评论