当前位置: 首页 > 模拟 模拟-模拟简介-关于模拟的教程文章在线阅读

模拟-模拟简介-模拟资料

模拟
  • [BZOJ1583] [Usaco2009 Mar]Moon Mooing 哞哞叫(队列)传送门

    思想有点像蚯蚓那个题

    #include <cstdio>
    #define N 0001
    #define LL long long
    #define min(x, y) ((x) < (y) ? (x) : (y))
    #define max(x, y) ((x) > (y) ? (x

  • [luoguP2129] L国的战斗续之多路出击(模拟 || 矩阵)传送门

    1.模拟
    easy

    #include <cstdio>
    #define N 500001

    int n, m;
    int X[N], Y[N], x[N], y[N], a = 1, b = 1, p, q;
    char s[N][1];

    int main()

    for(i = m; i

  • [luoguP1627] 中位数(模拟?)传送门

    水题,怎么评到这个难度的?


    #include <cstdio>
    #include <iostream>
    #define N 200001

    int n, b, p, ans = 1;
    int c[N], d[N], a[N];
    int *num1 = c + 100000, *n

  • [luoguP1097] 统计数字(水)传送门

    这么水的题,也只有提高组第一题了吧

    代码

    #include <cstdio>
    #include <iostream>
    #include <algorithm>
    #define N 200001

    int n, cnt = 1;
    int a[N];

    inline

  • [luoguP1058] 立体图(超级大模拟(¬︿̫̿¬☆))传送门

    看到题后整个人成了mengbier
    但是仔细分析一下就很简单了,先确定好输出的图的长和宽。
    然后从输入的矩形的左上角的最下面的开始填充,顺序是从下到上,从左到右,从后往

  • [luoguP1086] 花生采摘(模拟)传送门

    模拟。。。

    代码

    #include <cstdio>
    #include <iostream>
    #include <algorithm>
    #define abs(x) ((x) < 0 ? (x) : (x))

    int n, m, k, cnt, ans;

    struct node

  • [luoguP1010] 幂次方 ^(* ̄(oo) ̄)^传送门

    递归。。

    代码

    #include <cstdio>

    int n;
    int bit[15];

    inline void solve(int x)

    for(i = 14; i >= 0 && x; i)
    if(x >= bit[i])

    }

    int main()

  • [luoguP1042] 乒乓球(模拟)传送门

    终于过了这sb题了。
    当初我连这道题都A不了(╯▔皿▔)╯

    代码

    #include <cstdio>
    #include <iostream>
    #define N 1000001
    #define abs(x) ((x) < 0 ? (x) : (x)

  • [luoguP1022] 计算器的改良(模拟)传送门

    超级大模拟。。

    代码

    #include <cstdio>
    #include <cstring>
    #include <iostream>
    #define isword(x) ((x) >= 'a' && (x) <= 'z')

    int n, a1, b1, a2, b2, f,

  • [luoguP2626] 斐波那契数列(升级版)(模拟)传送门

    模拟

    代码

    #include <cmath>
    #include <cstdio>
    #include <iostream>
    #define N 50
    #define M 1000001
    #define LL long long

    int n, m;
    LL f[N], a[M], p[M];

  • [luoguP1098] 字符串的展开(模拟)传送门

    一个模拟。

    代码

    #include <cstdio>
    #include <cstring>
    #include <iostream>
    #define isword(x) ((x) >= 'a' && (x) <= 'z')
    #define swap(x, y) ((x) ^= (y)

  • [luoguP1076] 寻宝(模拟)传送门

    模拟就好!
    然后需要把一圈的有楼梯的都记录一下,取膜乱搞。

    代码

    #include <cstdio>
    #include <iostream>
    #define N 10001
    #define M 101

    int n, m, s, t, len,

  • [luoguP1056] 排座椅(sort + 模拟)传送门

    nc题,一直sort就过了

    代码

    #include <cstdio>
    #include <iostream>
    #include <algorithm>
    #define N 2001
    #define min(x, y) ((x) < (y) ? (x) : (y))

    int n, m

  • [luoguP1033] 自由落体(模拟?)传送门

    这不能算是数论题。。。
    卡精度这事noip也做的出来。。

    代码

    #include <cmath>
    #include <cstdio>

    int n, ans;
    double h, s1, v, l, k, r = 0.0001;

    inline b

  • [luoguP1015] 回文数(模拟 + 高精度?)传送门

    类似高精的操作。。。

    代码

    #include <cstdio>
    #include <cstring>
    #include <iostream>
    #define N 100001

    int n, len;
    int a[N], b[N], c[N];
    char m[N];

    in

  • [luoguP1981] 表达式求值(U•ェ•*U)传送门

    弄两个栈,一个存数,一个存运算符,然后乱搞。

    代码

    #include <cstdio>
    #include <cstring>
    #include <iostream>
    #define N 1000001

    int n, top_d, top_f;
    int stac

  • [luoguP1351] 联合权值(Dfs)传送门

    距离为2的点会产生权值,第一问,只需要在dfs的时候把一个点相邻的点都处理出来就行。
    具体处理方式看代码,然而这样只处理了一遍,最后在乘2就好了。
    第二问只需要处理一

  • [luoguP2038] 无线网络发射器选址(模拟)传送门

    又是个模拟水题,考虑边界就好,连long long都不用开。

    ——代码


    1 #include <cstdio>
    2 #include <iostream>
    3
    4 int n, d, ans, max;
    5 int a[201][201];

  • [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 # include <cmath>
    6 # include <

  • [HNOI2009]梦幻布丁(链表+启发式合并)
    启发式合并——染色后的布丁也能吃



    洛谷传送门
    开始一个O(n^2)思路,每次每句要改变颜色的点,改变完颜色后重新计算颜色的段数,显然拉闸。
    然后呢。。


  • 英特尔与 Vertiv 合作开发液冷 AI 处理器
  • 英特尔第五代 Xeon CPU 来了:详细信息和行业反应
  • 由于云计算放缓引发扩张担忧,甲骨文股价暴跌
  • Web开发状况报告详细介绍可组合架构的优点
  • 如何使用 PowerShell 的 Get-Date Cmdlet 创建时间戳
  • 美光在数据中心需求增长后给出了强有力的预测
  • 2027服务器市场价值将接近1960亿美元
  • 生成式人工智能的下一步是什么?
  • 分享在外部存储上安装Ubuntu的5种方法技巧
  • 全球数据中心发展的关键考虑因素
  • 英特尔与 Vertiv 合作开发液冷 AI 处理器

    英特尔第五代 Xeon CPU 来了:详细信息和行业反应

    由于云计算放缓引发扩张担忧,甲骨文股价暴跌

    Web开发状况报告详细介绍可组合架构的优点

    如何使用 PowerShell 的 Get-Date Cmdlet 创建时间戳

    美光在数据中心需求增长后给出了强有力的预测

    2027服务器市场价值将接近1960亿美元

    生成式人工智能的下一步是什么?

    分享在外部存储上安装Ubuntu的5种方法技巧

    全球数据中心发展的关键考虑因素