牛客305146746号
牛客305146746号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客305146746号的博客
全部文章
/ 题解
(共48篇)
题解 | #统计每个月兔子的总数#
#include <stdio.h> //本质上是斐波那契数列 //f(n) = f(n-1) + f(n-2) static int count(int n) { if(n == 1 || n == 2) { return 1; } e...
C
2022-06-07
0
146
题解 | #密码验证合格程序#
#include <stdio.h> static int judgeType(char *str, int len) { if(!str || len <= 0) { return -1; } int strType[4] = {...
C
2022-06-07
3
530
题解 | #蛇形矩阵#
#include <stdio.h> int main() { int array[100] = {0}; int num = 0; scanf("%d", &num); int count = 1; /* 给首行赋值 */ ar...
C
2022-06-06
0
222
题解 | #图片整理#
方法一:冒泡排序 #include <stdio.h> int main() { char str[1000] = {0}; scanf("%s", str); int len = strlen(str); char temp = '0'; f...
C
2022-06-06
0
325
题解 | #坐标移动#
#include <stdio.h> typedef struct { int x; int y; }point_t; static int isPointFlag(char c) { if(c == 'A' || c == 'D' || c ==...
C
2022-06-03
0
283
题解 | #单词倒排#
#include <stdio.h> //1、P2记录单词的末尾位置 //2、P1记录单词的开头位置 int isLetter(char c) { if(c >= 'A' && c <= 'Z' || c >= 'a' &...
C
2022-06-02
1
272
题解 | #删除字符串中出现次数最少的字符#
哈希表法: #include <stdio.h> int main() { char str[20] = {0}; int flag[26] = {0}; gets(str); int len = strlen(str); for(int i =...
C
2022-06-02
3
396
题解 | #汽水瓶#
方法一:根据题目条件循环判断 #include <stdio.h> int main() { int num = 0; while(scanf("%d", &num)) { int ret = 0; if(num == 0...
C
2022-06-01
0
197
题解 | #字符串排序#
#include <stdio.h> //冒泡排序 int sort_char(char str[][101], int n) //二维数组作为参数 { char tmp[101] = {0}; for(int i = 0; i < n; i++) ...
C
2022-06-01
0
300
题解 | #句子逆序#
#include <stdio.h> int main() { char str[1024] = {0}; int len = 0; gets(str); len = strlen(str); for(int i = len-1; i >=...
C
2022-06-01
1
294
首页
上一页
1
2
3
4
5
下一页
末页