构造
文章平均质量分 88
wckdzz
这个作者很懒,什么都没留下…
展开
-
2021牛客暑期多校训练营1&2
题目整理: 第一场因为起晚了没赶上前半场(汗) 我参与做的是H和K H:Hash Function 题意是给出n个数a1~an,求出一个最小的模数p,使得所有ai对p取模互不相同 1≤n≤500000 0≤a i≤500000 并且ai之间互不相等 标算似乎是FFT还是NTT,不太清楚 我们队的做法是先用0.5s删掉不可能的答案 再用剩下的时间找出可行解 已知余数互不相等,且过大的模数不具备意义,那么n<=p<=a[n]+1 对于序列中随机两个数,a[i]和a[j],如果使得a[i]%p==a[原创 2021-07-19 23:44:21 · 124 阅读 · 0 评论 -
2020牛客暑期多校训练营Day1 1or2(1还是2)
题目描述: Bobo has a graph with n vertices and m edges where the i-th edge is between the vertices ai and bi. Find out whether is possible for him to choose some of the edges such that the i-th vertex is incident with exactly di edges. 输入: 2 1 1 1 1 2 2 1 2原创 2020-07-30 11:05:29 · 264 阅读 · 0 评论