摘要: ## 实验任务4 ### 实验代码 ``` #include #include #include const int N = 5, M = 100; int main() { char ch[M]; int n = 0; FILE *fp; fp = fopen("data4.txt","r"); 阅读全文
posted @ 2023-06-08 16:50 C锥 阅读(30) 评论(0) 推荐(1) 编辑
摘要: ## 实验任务4 ### 实验代码 ``` #include #include #define N 100 typedef struct { char num[10]; int s1, s2; double sum; char level[10]; } STU; int fun(STU a[], i 阅读全文
posted @ 2023-05-25 17:19 C锥 阅读(25) 评论(2) 推荐(1) 编辑
摘要: 实验任务1 实验代码 #include <stdio.h> #define N 4 int main() { int x[N] = {1, 9, 8, 4}; int i; int *p; for (i = 0; i < N; ++i) printf("%d", x[i]); printf("\n" 阅读全文
posted @ 2023-05-06 20:25 C锥 阅读(13) 评论(0) 推荐(1) 编辑
摘要: 实验任务1 实验代码 #include <stdio.h> #define N 4 int main() { int a[N] = {2, 0, 2, 3}; char b[N] = {'2', '0', '2', '3'}; int i; printf("sizeof(int) = %d\n", 阅读全文
posted @ 2023-04-13 17:04 C锥 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 实验代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void print_text(int line, int col, char text[]); 阅读全文
posted @ 2023-03-30 23:04 C锥 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 实验任务1 实验代码 #include <stdio.h> #include <time.h> #include <stdlib.h> #define N 5 #define R1 586 #define R2 701 int main() { int number, i; srand(time(0 阅读全文
posted @ 2023-03-16 19:09 C锥 阅读(52) 评论(1) 推荐(1) 编辑
摘要: 实验任务1 实验代码 #include <stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); printf(" O \n"); printf("<H>\n"); printf("I I\n"); retur 阅读全文
posted @ 2023-03-02 17:15 C锥 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 多项式题目总结 最近把学长讲的生成函数, 多项式(也不知道叫啥, 反正要推式子)的题都做了, 趁还记得写个总结. P2000 拯救世界 题目链接 普通型生成函数板子题. 定义一个多项式$A(x) = \sum_{\infty} a_i*xi$第$i$项的系数$a_i$为石头数量为$i$时的答案. 把 阅读全文
posted @ 2021-03-16 22:02 C锥 阅读(185) 评论(1) 推荐(0) 编辑
摘要: 省选测试14 T1 你有一个字符串 $S_0$​,想要用它造出共 n 个新字符串 \(S_{0},\cdots,S_{n-1}​\)。 你会按顺序进行 n-1 次操作,造出新字符串。第 i 次操作有两种方法: S x l r 截取 $S_x$​ 的 [l,r) 子串,即第 l 到第 r-1 个字符作 阅读全文
posted @ 2021-03-15 20:42 C锥 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 省选测试 13 T1 ​ ​ 给定一个$n*m$大小的网格, 每个格子里可以填$'('\(或\)')'$. 某一行或某一列可以形成一个合法的括号序列.问最大有多少行和多少列是合法的括号序列. ​ \(n,m\leq 5000\). ​ 分情况构造就好了. (我当时竟然一直在想二分图....) ​ 首 阅读全文
posted @ 2021-03-14 09:13 C锥 阅读(48) 评论(0) 推荐(0) 编辑