• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
nannandbk
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
2023年8月5日
2023牛客暑期多校训练营6 GEC
摘要: # 2023牛客暑期多校训练营6 ## G-Gcd 题意:一开始给你一个集合$S = \lbrace x,y \rbrace(x\neq y)$。然后你可以执行以下两个操作: + 1.从$S$中选择两个元素$a,b(a \neq b )$,把$a-b$加入集合。 + 2.从$S$选择2个元素是$a, 阅读全文
posted @ 2023-08-05 16:32 nannandbk 阅读(116) 评论(1) 推荐(2)
2023年7月27日
[图论]强连通分量
摘要: # 强连通分量 ## 一、强连通分量 ### 1.DFS森林和强连通分 #### (1)**DFS Forest** + Tree Edge指树边 + Back Edge指连向祖先的边(返祖边) + Forward Edge指连向子孙的边(前向边,它主要是在搜索的时候遇到了一个已经访问过的结点,但是 阅读全文
posted @ 2023-07-27 15:21 nannandbk 阅读(213) 评论(1) 推荐(2)
2023年7月10日
AtCoder Beginner Contest 309 ABCDE
摘要: # [AtCoder Beginner Contest 309](https://atcoder.jp/contests/abc309) ## **A - Nine** ### Problem Statement 题意:给你两个数问你是否在图上是相邻的。 ### Solution 思路:按照图写下关 阅读全文
posted @ 2023-07-10 00:04 nannandbk 阅读(38) 评论(0) 推荐(2)
2023年7月9日
next_permutation 函数
摘要: # next_permutation 函数 next_permutation是全排列函数。 ## 一、基本用法 ```c++ int a[]; do{ }while(next_permutation(a,a+n)); ``` ## 二、例题 [P1088 [NOIP2004 普及组] 火星人]([P 阅读全文
posted @ 2023-07-09 12:58 nannandbk 阅读(272) 评论(0) 推荐(2)
round 函数
摘要: # round 函数 要求**四舍五入**的情况,用round函数就很方便。 ## 一、用法 ### 1.基本用法 对于小数而言,round()函数**仅仅保留到整数位**,仅对小数点后一位进行四舍五入。 比如:round(1.5) = 2.000000,round(1.57) = 2.000000 阅读全文
posted @ 2023-07-09 12:58 nannandbk 阅读(176) 评论(0) 推荐(0)
lower_bound 和 upper_bound函数
摘要: # lower_bound 和 upper_bound函数 ## 一、用法 ### 1.对于递增序列 当容器中的元素按照**递增**的顺序存储时,lower_bound函数返回容器中第一个**大于等于**目标值的位置,upper_bound函数返回容器中第一个**大于**目标值的位置。若容器中的元素 阅读全文
posted @ 2023-07-09 12:58 nannandbk 阅读(1843) 评论(0) 推荐(1)
AtCoder Beginner Contest 273 ABCD
摘要: # [AtCoder Beginner Contest 273](https://atcoder.jp/contests/abc273) ## **A - A Recursive Function** ### Problem Statement 题意:给你一个函数$f(x)$ - $f(0)=1$ 阅读全文
posted @ 2023-07-09 12:57 nannandbk 阅读(38) 评论(0) 推荐(1)
2023年7月7日
AtCoder Beginner Contest 264 ABCDE
摘要: # [AtCoder Beginner Contest 264](https://atcoder.jp/contests/abc264) ## **A - "atcoder".substr()** ### Problem Statement 题意:截取字符串 `atcoder`的[L,R]一段并输出 阅读全文
posted @ 2023-07-07 17:23 nannandbk 阅读(103) 评论(0) 推荐(2)
2023年7月4日
[数论]阶、原根和指数方程
摘要: # Order and primitive root and exponential equations(阶、原根和指数方程) ## 一、概念 ### 1、阶 阶:$a^x ≡1 (\bmod m)$上面的x就是阶 ### 2、原根 $\bmod m$的阶为$\phi(m)$的数 ### 3、指数方 阅读全文
posted @ 2023-07-04 00:28 nannandbk 阅读(1236) 评论(0) 推荐(2)
AtCoder Beginner Contest 308 ABCDEF
摘要: #[AtCoder Beginner Contest 308](https://atcoder.jp/contests/abc308) ## **A - New Scheme** ### Problem Statement 题意:给你8个数,如果满足以下条件输出Yes,否则输出No 条件: 1. 单 阅读全文
posted @ 2023-07-04 00:21 nannandbk 阅读(112) 评论(0) 推荐(2)
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3