4thirteen2one
4thirteen2one
全部文章
分类
题解(37)
归档
标签
去牛客网
登录
/
注册
4thirteen2one的博客
TA的专栏
1篇文章
0人订阅
我的刷题记录
1篇文章
353人学习
全部文章
(共57篇)
题解 | #HJ73 计算日期到天数转换#
#include <stdio.h> int main() { int daysPerMonth[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int y, m, d, s; while (scanf...
C
2022-06-19
0
351
题解 | #HJ53 杨辉三角的变形#
#include <stdio.h> int main() { int n, pos; while(scanf("%d", &n) != EOF) { if (n==1 || n==2) { pos = -1; ...
C
2022-06-18
0
358
题解 | #HJ62 查找输入整数二进制中1的个数#
#include <stdio.h> int countOnes(int x) { int ones = 0; while (x > 0) { x &= (x - 1); ones++; } return o...
C
2022-06-18
0
353
题解 | #HJ48 从单向链表中删除指定值的节点#
#include <stdio.h> #include <stdlib.h> typedef struct tLinkNode { int data; struct tLinkNode *next; } LinkNode; int main() { ...
C
2022-06-17
2
458
题解 | #AB9 【模板】链表#
C语言版本 #include <stdio.h> #include <stdlib.h> #include <stdbool.h> typedef struct tLinkNode { int data; struct tLinkNode *ne...
C
链表
2022-05-30
3
762
题解 | #AB8 【模板】循环队列#
C语言版本 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> typedef struct tQueue { int *data, ...
C
队列
2022-05-30
1
447
题解 | #HJ108 求最小公倍数#
C语言版本 #include <stdio.h> int gcd(int a, int b) { return (b==0)? a: gcd(b, a%b); } int lcm(int a, int b) { return a*b/gcd(a,b); } int ...
C
2022-05-27
0
822
题解 | #NC52 有效括号序列#
Python版本暴力解法 class Solution: def isValid(self, s: str) -> bool: stack = [] for c in s: if c == '(' or c == '[' or c...
Python3
2022-05-25
1
645
题解 | #HJ68 成绩排序#
Python版本 n = int(input()) order_mode = int(input()) status_list = [] for i in range(n): name, score = input().strip().split() score = int(sco...
Python3
2022-05-25
2
794
题解 | #HJ14 字符串排序#
Python版本 n = int(input()) string_list = [] for i in range(n): string_list.append(input()) string_list.sort() for string in string_list: prin...
C
Python3
2022-05-25
8
1828
首页
上一页
1
2
3
4
5
6
下一页
末页