深海的蓝衿
深海的蓝衿
全部文章
分类
归档
标签
去牛客网
登录
/
注册
深海的蓝衿的博客
全部文章
(共34篇)
题解 | #删除有序链表中重复的元素-I#
史上最强没有之一 struct ListNode* deleteDuplicates(struct ListNode* head) { struct ListNode *current = head; // 遍历链表 while (current != NULL &...
2023-12-21
0
262
题解 | #牛牛的双链表求和#
多写你就明白了 #include<stdio.h> #include<stdlib.h> typedef struct Doublelist{ int value; struct Doublelist*next; struct Doublelist*prev; }Double...
2023-12-13
0
259
题解 | #牛牛的单链表求和#
#include<stdio.h> #include<stdlib.h> typedef struct ListNode{ int value; struct ListNode*next; }ListNode; ListNode*creatNode(int value)...
2023-12-13
0
233
题解 | #牛牛的四叶玫瑰数#
#include <stdio.h> #include<math.h> // 计算 base 的 n 次幂 int pow4(int base) { return base * base * base * base; } // 检查数字是否为四叶玫瑰数 int i...
2023-12-07
0
297
题解 | #兔子的序列#
#include <stdio.h> #include <math.h> int xiu(int *p,int n) { int max = 0; for(int i = 0;i<n;i++) { if(p[i]!=pow((in...
2023-03-06
0
324
题解 | #[NOIP1999]回文数#
//这题的难度相当大,我看了解题方法中的大佬C语言的答案比较难直接领会 //就特别写了详细的注解,希望你能轻松收获; #include <stdio.h> int n;//规定输入进制的变量 int arr[20] = {0};//储存改变进制的数组 int arr_r[20] = {0...
2023-01-13
8
464
题解 | #牛牛的素数和#
用开根的方法要注意数字不能小 #include <stdio.h> #include <math.h> int sushi(int a,int b) { int sum=0,c; for(int i = a;i<=b;i++) { for(int j =...
2023-01-08
0
263
题解 | #[NOIP2010]数字统计#
#include <stdio.h> int census(int L,int R) { int count = 0; for(int i = L;i<=R;i++) { if(i%10==2) count++; if(i%100/10==2) count++; if(i%...
2023-01-07
0
284
题解 | #序列重组矩阵#
就是一个解决输出矩阵的题目 #include <stdio.h> int main() { int a, b; while (scanf("%d %d", &a, &b) != EOF) { int V[a][b]; for(int i...
2022-12-26
0
243
题解 | #KiKi判断上三角矩阵#
我这个方法投机取巧用了打点的方法,首先确定左下,左上,右下三个点就可以欺骗90%的矩阵,剩下那个分类打点即可,注意2阶矩阵的分界线 #include <stdio.h> int main() { int n; while (scanf("%d", &n) != E...
2022-12-26
0
286
首页
上一页
1
2
3
4
下一页
末页