2025年4月8日
摘要: 1)进制转化 https://www.lanqiao.cn/problems/2108/learning/ 阅读全文
posted @ 2025-04-08 21:39 Hoshino1 阅读(2) 评论(0) 推荐(0)
  2025年4月2日
摘要: 1 高精度 注意 printf(""%Lf",a);不需要取地址 1)R问题 https://www.lanqiao.cn/problems/19710/learning/ 点击查看代码 #include<bits/stdc++.h> using namespace std; int main() 阅读全文
posted @ 2025-04-02 21:51 Hoshino1 阅读(1) 评论(0) 推荐(0)
  2025年3月30日
摘要: 1 广搜 1)ab路线 https://www.luogu.com.cn/problem/P9425 特殊的是 这里定义了queue<array<int, 3>> q;队列里每个点是一个数组,这样能保存上一个点的状态。 我们不需要判断走的这个是a是b,只需要判断和上一个走的点的关系(上一个走过的点更 阅读全文
posted @ 2025-03-30 22:06 Hoshino1 阅读(3) 评论(0) 推荐(0)
  2025年3月29日
摘要: 1 递推 约瑟夫环问题 https://blog.csdn.net/u011500062/article/details/72855826 https://www.luogu.com.cn/problem/P8671 点击查看代码 #include<iostream> using namespace 阅读全文
posted @ 2025-03-29 21:27 Hoshino1 阅读(2) 评论(0) 推荐(0)
  2025年3月26日
摘要: ##1 模拟 ###输入输出 #####while(scanf("%d", &a) != EOF) ####cin 会将空格作为输入的分隔符,停止当前输入项的读取,继续等待下一个输入项。 会将回车符视为输入分隔符,停止当前输入项的读取,除非回车符是当前输入的首个字符(此时会忽略该回车符,继续等待输入 阅读全文
posted @ 2025-03-26 21:54 Hoshino1 阅读(1) 评论(0) 推荐(0)
  2025年3月21日
摘要: 1 双指针 1)统计子矩阵 指针要求单调性,第一题都是头指针,第二题是头尾指针,确定用哪个,要看怎样能保持单调性。我们不希望指针调头 https://www.luogu.com.cn/problem/P8783 2)整数小拼接 https://www.luogu.com.cn/problem/P87 阅读全文
posted @ 2025-03-21 21:46 Hoshino1 阅读(4) 评论(0) 推荐(0)
  2025年3月11日
摘要: 1 前缀和 1 k倍区间) https://www.luogu.com.cn/problem/P8649 之差是k的倍数,性质:两个数取余k相同时,之差是k的倍数。所以只需要记录每个前缀和取模k,每新增一个曾经出现的余数,它能和之前存入的m个相同余数组成k差,ans+=m。 并且要注意0的位置。这相 阅读全文
posted @ 2025-03-11 21:49 Hoshino1 阅读(2) 评论(0) 推荐(0)
  2025年3月10日
摘要: 前缀和 1)求和 https://www.luogu.com.cn/discuss?forum=P8772 2)统计子矩阵 https://www.luogu.com.cn/problem/P8783 前缀和,四层循环tle2 #include <iostream> using namespace 阅读全文
posted @ 2025-03-10 22:15 Hoshino1 阅读(1) 评论(0) 推荐(0)
  2024年12月28日
摘要: 选择判断 特别是对于范围在 -5 到 256 之间的整数。对于这些整数,Python 会使用缓存机制,即它们在程序的生命周期内是单例的,所有引用该值的地方都会指向同一个内存地址。 while和for可以有else for i in range(5): print(i) if i == 3: brea 阅读全文
posted @ 2024-12-28 19:30 Hoshino1 阅读(8) 评论(0) 推荐(0)
  2024年12月23日
摘要: #define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <string.h> #include <time.h> //航空初始界面 void welc 阅读全文
posted @ 2024-12-23 16:38 Hoshino1 阅读(26) 评论(0) 推荐(0)



点击右上角即可分享
微信分享提示