首页 > AKU NEGARAKU
头像 __故人__
发表于 2020-10-13 21:02:32
题意 给你 两个整数,要求求出约瑟夫问题中最后一个人是谁。 分析 总所周知,约瑟夫问题有模拟 ,线性 。这里解释一种 的解决方法。考虑到我们每次走 个删一个,那么在一圈以内我们可以删掉 个。我们可以模拟这个过程递归求解。由于每次递归问题规模变为 。通过归纳验证时间复杂度大概是 代码 展开全文
头像 拼命坚持ing
发表于 2020-10-24 19:24:13
链接:https://ac.nowcoder.com/acm/contest/7818/J 来源:牛客网 题目描述 The State Veterinary Services Department recently reported an outbreak of a newly found c 展开全文
头像 阿哲不是吧
发表于 2020-10-02 14:23:21
来源:牛客网: 题目描述 1st Academy is an international leadership training academy based in Kuala Lumpur. Every year, the company trains thousands of people to 展开全文
D题, 最小生成树模板题, 我的代码是用的二阶矩阵实现 /* prim 算法 - 二阶矩阵 */ #include "bits/stdc++.h" using namespace std; const int maxn = 1e3+5; const int inf = 0x3f3f3f3f 展开全文
头像 拼命坚持ing
发表于 2020-10-26 10:10:22
题目描述 链接:https://ac.nowcoder.com/acm/contest/7818/A 来源:牛客网 1st Academy is an international leadership training academy based in Kuala Lumpur. Ev 展开全文
头像 Anonytt
发表于 2020-10-04 13:26:18
Day2 B题题解(Dijkstra+状压DP)https://www.cnblogs.com/Anonytt/p/13767026.html

等你来战

查看全部