摘要: 2024.4.12 这两天写了一个洛谷题——P2141 [NOIP2014 普及组] 珠心算测验 我写的题解是这样的 #include<stdio.h> void f(int *num){ scanf("%d",num); int a[110]; int b[110]; for(int i=0;i< 阅读全文
posted @ 2024-04-12 19:23 pengfu_xin 阅读(2) 评论(0) 推荐(0) 编辑
摘要: P1427 小鱼的数字游戏 #include <stdio.h> void f(long long *a) { int c = 0; for (int i = 0; i < 101; i++) { a[i] = 1; } while(a[c]==1){ scanf("%lld",&a[c]); if 阅读全文
posted @ 2024-04-11 21:10 pengfu_xin 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 2024.4.11 P1047 [NOIP2005 普及组] 校门外的树 #include<stdio.h> void f(int *arry){ for(int i=0;i<10001;i++){ arry[i]=0; } int total=0,num=0; int m_1=0,m_2=0; s 阅读全文
posted @ 2024-04-11 20:40 pengfu_xin 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 2024.4.8 今天写了那个题单的第二题和第三题,记住一般情况下不要用else,而是要else if,不然有些特殊情况难以解决 阅读全文
posted @ 2024-04-08 22:41 pengfu_xin 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 2024.4.2 今天得到学长学姐的指导,感觉对睿抗程序竞赛充满了信心; 看着师姐吐槽ACM很难很难,竟然刷洛谷一万分也拿不到三等奖,我也压力山大,我会努力的! 尽量熟悉C++,平时的课也要认真听!数据结构,程序设计竞赛。 阅读全文
posted @ 2024-04-02 17:52 pengfu_xin 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 今天在程序竞赛上的打印漏斗, 总结:发现数学规律,更容易做题; ceil函数头文件为<math.h>,并且只能对double类型进行向上取整; ps:floor为向下取整; #include<stdio.h> #include<math.h> void f(double *x){ for(int i 阅读全文
posted @ 2024-04-01 21:30 pengfu_xin 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 20024.3.27 日常打卡,学学前端三件套,java 今天学了一点三件套,其中前部分注释为我所写 <!DOCTYPE html><!--定义文档类型,是个html5文档--> <html lang="en"><!--开始html文档,并规定文档所用语言用英文--> <head><!--开始了文档 阅读全文
posted @ 2024-03-27 21:06 pengfu_xin 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 2024.3.26 日常签到 写头歌 阅读全文
posted @ 2024-03-26 22:15 pengfu_xin 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 2024 年 3 月 13 日 学习 C 语言 switch case 结构 switch(a/10){ case 10:printf("A");break; default:printf(""); } 以上为 switch 使用的一个例子. 如下为今日程序竞赛一个数组遍历取最大值的好方法 int 阅读全文
posted @ 2024-03-25 21:44 pengfu_xin 阅读(11) 评论(0) 推荐(0) 编辑