摘要: 参考教程: 裴蜀定理 - OI Wiki (oi-wiki.org) 内容: 设a,b是不全为零的整数,则存在整数x,y使得$ax+by=gcd(a,b)$。 例题: Problem - D - Codeforces 传送门: Problem - D - Codeforces 题意: 思路: 裴蜀定 阅读全文
posted @ 2022-07-18 20:54 wtn135687 阅读(105) 评论(0) 推荐(0)
摘要: 参考教程: (6条消息) 逆元原理详解_跑起来要带风!的博客-CSDN博客 (6条消息) 密码学中模运算的逆元求解_Gardenia Minwentel的博客-CSDN博客_模逆元怎么求 原理: $a^{m-1}mod m=1modm$(m为素数) $a*a^{m-2}mod m=1modm$ $\ 阅读全文
posted @ 2022-07-18 19:50 wtn135687 阅读(83) 评论(0) 推荐(0)
摘要: Codeforces Round #808 (Div. 2) 传送门:https://codeforces.com/contest/1708 错过了,第二天vp的,只写出了AB就卡C了,竟然看不出是贪心555 A. Difference Operations 题意:给一个数组,由如下操作,问能不能使 阅读全文
posted @ 2022-07-18 11:52 wtn135687 阅读(56) 评论(0) 推荐(0)
摘要: Codeforces Round #807 (Div. 2) 这场上了80分,刚好上蓝嘿嘿。 传送门:https://codeforces.com/contest/1705 A. Mark the Photographer 题意:2n个人排成两排,每排n个人。要求后面的人要比前面的人高至少x 问是否 阅读全文
posted @ 2022-07-18 11:18 wtn135687 阅读(81) 评论(0) 推荐(0)