摘要: ``` #include #include #include #include #include #define ONE 1 #define FIFTEEN 15 #define SEVENTY_NINE 79 int main() { printf("One byte = %d bits on t 阅读全文
posted @ 2023-01-18 18:17 残影0无痕 阅读(52) 评论(0) 推荐(0)
摘要: 选择数据类型并输入数字,输出在内存上对应的十六进制表示 #include <stdio.h> #include <stdlib.h> #include <ctype.h> typedef unsigned char* byte_pointer; void char_out(); void unsig 阅读全文
posted @ 2023-01-18 18:14 残影0无痕 阅读(76) 评论(0) 推荐(0)
摘要: P1012 [NOIP1998 提高组] 拼数 #include <stdio.h> #include <stdlib.h> #include <string.h> #define LENGTH 11 int minn(int a, int b) { return a < b ? a : b; } 阅读全文
posted @ 2023-01-18 08:10 残影0无痕 阅读(43) 评论(0) 推荐(0)
摘要: 2487. 从链表中移除节点 - 力扣(Leetcode) 题解 思路一:递归逆序 struct ListNode* removeNodes(struct ListNode* head){ if(head->next == NULL)//遍历到链表末尾 return head; struct Lis 阅读全文
posted @ 2022-12-15 13:44 残影0无痕 阅读(67) 评论(0) 推荐(0)
摘要: 【21网络赛C】来帮我们排排名 - 题目 - DSOJ #include <stdio.h> #include <stdlib.h> #include <string.h> struct player_data { char id[11]; int problem_time[5]; int pass 阅读全文
posted @ 2022-11-18 19:51 残影0无痕 阅读(50) 评论(0) 推荐(0)
摘要: 1922. 统计好数字的数目 - 力扣(Leetcode) 题解 思路一:快速幂 #define MOD 1000000007 long long power(int n, long long times) { if(times == 1) return n; if(times == 0) retu 阅读全文
posted @ 2022-11-16 14:58 残影0无痕 阅读(88) 评论(0) 推荐(0)
摘要: 46. 全排列 - 力扣(Leetcode) 题解 思路:DFS - 注意:力扣测试数据时不会将全局变量重置,要手动重置 int ptr_line = 0; int mark[6]; void deep_find(int depth, int* nums, int** ans, int numsSi 阅读全文
posted @ 2022-11-16 12:37 残影0无痕 阅读(58) 评论(0) 推荐(0)
摘要: 题目描述 给定一个经过编码的字符串,返回它解码后的字符串。 编码规则为: k[encoded_string],表示其中方括号内部的 encoded_string 正好重复 k 次。注意 k 保证为正整数。 你可以认为输入字符串总是有效的;输入字符串中没有额外的空格,且输入的方括号总是符合格式要求的。 阅读全文
posted @ 2022-11-09 23:58 残影0无痕 阅读(253) 评论(0) 推荐(0)
摘要: A+B Problem(高精) 题目描述 高精度加法,相当于 a+b problem,不用考虑负数。 输入格式 分两行输入。$a,b \leq 10^{500}$。 输出格式 输出只有一行,代表 $a+b$ 的值。 样例 #1 样例输入 #1 1 1 样例输出 #1 2 样例 #2 样例输入 #2 阅读全文
posted @ 2022-10-21 21:08 残影0无痕 阅读(196) 评论(0) 推荐(0)
摘要: 题目描述 给定一个表示分数加减运算的字符串expression,你需要返回一个字符串形式的计算结果。 这个结果应该是不可约分的分数,即最简分数。 如果最终结果是一个整数,例如2,你需要将它转换成分数形式,其分母为1。所以在上述例子中, 2 应该被转换为 2/1。 样例 样例输入 #1 2/1+1/3 阅读全文
posted @ 2022-10-14 11:12 残影0无痕 阅读(37) 评论(0) 推荐(0)