• 首页
  • 文章
  • 项目
    • Demos
  • 友链
  • 关于

Leohh


Whatever the future brings, you are my light
【学习笔记】逆元
OI/ACM

【学习笔记】逆元

定义 若 ax\equiv 1\pmod{p},则称 x 为 a 关于 p 的逆元,记作 a^{-1} 逆元存在的充要条件:a,p 互质,即 \mathrm{gcd}(a,p)=1 求解 exgcd求逆元 由于同余方程 …

2020-07-04 0条评论 121次阅读 0人点赞 Leohh 阅读全文
【学习笔记】二元一次不定方程(exgcd)
OI/ACM

【学习笔记】二元一次不定方程(exgcd)

定义 二元一次不定方程的形式为:ax+by=c,与同余方程 ax\equiv c\pmod{b} 等价 扩展欧几里得算法(exgcd) 该算法用于求解形如 ax+by=\mathrm{gcd}(a,b) 的不定方程 当 …

2020-07-04 0条评论 149次阅读 0人点赞 Leohh 阅读全文
Codeforces 1367F1 Flying Sort (Easy Version)【枚举下限 二分上限】
OI/ACM

Codeforces 1367F1 Flying Sort (Easy Version)【枚举下限 二分上限】

题目 This is an easy version of the problem. In this version, all numbers in the given array are distinct and th…

2020-07-04 0条评论 154次阅读 0人点赞 Leohh 阅读全文
Codeforces 1370E Binary Subsequence Rotation
OI/ACM

Codeforces 1370E Binary Subsequence Rotation

题目 Naman has two binary strings s and t of length n (a binary string is a string which only consists of the ch…

2020-07-03 0条评论 244次阅读 0人点赞 Leohh 阅读全文
【模板】网络流 Dinic算法
OI/ACM

【模板】网络流 Dinic算法

每次增广前,先bfs将图分层,然后不断dfs增广 两个优化: 多路增广 当前弧优化 时间复杂度: 一般图:O(n^2 m) 容量均为1的图:O(min\lbrace m^{\frac{3}{2}} ,n^{\frac{2…

2020-07-02 0条评论 107次阅读 0人点赞 Leohh 阅读全文
Codeforces 1373E Sum of Digits【构造】
OI/ACM

Codeforces 1373E Sum of Digits【构造】

题目 Let f(x) be the sum of digits of a decimal number x. Find the smallest non-negative integer x such that f(x…

2020-07-01 0条评论 184次阅读 0人点赞 Leohh 阅读全文
Codeforces 1336A Linova and Kingdom【贪心】
OI/ACM

Codeforces 1336A Linova and Kingdom【贪心】

题目 Writing light novels is the most important thing in Linova's life. Last night, Linova dreamed about a fanta…

2020-04-24 0条评论 217次阅读 0人点赞 Leohh 阅读全文
Codeforces 1343E Weights Distributing【分配边权的两段最短路】
OI/ACM

Codeforces 1343E Weights Distributing【分配边权的两段最短路】

题目 You are given an undirected unweighted graph consisting of n vertices and m edges (which represents the map…

2020-04-24 0条评论 360次阅读 0人点赞 Leohh 阅读全文
【学习笔记】分块
OI/ACM

【学习笔记】分块

其实是复习笔记 复习一下「分块」数列分块入门1 – 9 by hzwer T1:区间加法,单点查值 LOJ 6627 数列分块入门 1 做法:两边暴力加法,整块加法标记,复杂度 O(n\sqrt{n})​ #includ…

2020-04-17 0条评论 218次阅读 1人点赞 Leohh 阅读全文
【模板】主席树/可持久化线段树(Luogu P3834)
OI/ACM

【模板】主席树/可持久化线段树(Luogu P3834)

传送门:Luogu P3834 【模板】可持久化线段树 1(主席树)(静态区间第k小) #include <iostream> #include <stdio.h> #include <string.h…

2020-04-17 0条评论 134次阅读 0人点赞 Leohh 阅读全文
  • «
  • <
  • 2
  • 3
  • 4
  • 5
  • 6
  • >
  • »

咦?我是谁?我为什么会在这?[关于]

友链

  • C_K_Y_
  • FangHao
  • iNx
  • ObsdianGungnir
  • ranwen
  • Rising_shit
  • Wolf_Reiser

© 2021 Leohh. All Rights Reserved. | 已在风雨中度过 Loading...
Theme Kratos Made by Vtrois Modified by Moedog