模拟文章列表

[luoguP1056] 排座椅(sort + 模拟)
传送门 nc题,一直sort就过了 代码 #include cstdio#include iostream#include algorithm#define N 2001#define min(x, ...stl,模拟
[luoguP1015] 回文数(模拟 + 高精度?)
传送门 类似高精的操作。。。 代码 #include cstdio#include cstring#include iostream#define N 100001int n, len;int a[N...模拟,高精度
[luoguP1981] 表达式求值(U?ェ?*U)
传送门 弄两个栈,一个存数,一个存运算符,然后乱搞。 代码 #include cstdio#include cstring#include iostream#define N 1000001int n...模拟
[luoguP1010] 幂次方 ^(* ̄(oo) ̄)^
传送门 递归。。 代码 #include cstdioint n;int bit[15];inline void solve(int x)for(i = 14; i = 0 x; i)if(x = b...模拟
[luoguP1086] 花生采摘(模拟)
传送门 模拟。。。 代码 #include cstdio#include iostream#include algorithm#define abs(x) ((x) 0 ? (x) : (x))int...模拟
[luoguP2038] 无线网络发射器选址(模拟)
传送门 又是个模拟水题,考虑边界就好,连long long都不用开。 ——代码 1 #include cstdio 2 #include iostream 3 4 int n, d, ans, max...模拟
[luoguP1351] 联合权值(Dfs)
传送门 距离为2的点会产生权值,第一问,只需要在dfs的时候把一个点相邻的点都处理出来就行。 具体处理方式看代码,然而这样只处理了一遍,最后在乘2就好了。 第二问只需要处理一个点相邻的点中最大的和次大...dfs,模拟
[luoguP1328] 生活大爆炸版石头剪刀布(模拟)
传送门 虽然是模拟,但是我们可以用矩阵保存结果,来是其更加简便。 ——代码 1 #include cstdio 2 #include iostream 3 4 int map[5][5] = , 5 ...模拟
[luoguP2564][SCOI2009]生日礼物(队列)
传送门 当然可以用队列来搞啦。 1 # include iostream 2 # include cstdio 3 # include cstring 4 # include string 5 # i...单调队列,模拟
[HNOI2009]梦幻布丁(链表+启发式合并)
启发式合并——染色后的布丁也能吃 洛谷传送门 开始一个O(n^2)思路,每次每句要改变颜色的点,改变完颜色后重新计算颜色的段数,显然拉闸。 然后呢。。然后就不会了。 看了别人博客,才知道有个叫做启发式...启发式合并,模拟
香港服务器 数据安全 数据库 美国服务器 云服务器 IT DDoS Linux Windows 虚拟化