随笔分类 - 时间复杂度
摘要:题目链接 paint 题解 方法一:55分,纯模拟,用二维数组存储网格显然会爆空间,超空间,超时间。 #include<bits/stdc++.h> using namespace std; int t, n, m, q; const int maxN=1e4+10;//如果此处按题意开成1e5会导
阅读全文
摘要:题目来源 CSP2022-J-T1:http://oj.tfls.net/d/lnzt/p/13 题目分析 根据【数据范围】来分析 题解 int 占用空间4字节,32位,取值范围-2^31 ~ 2^31-1,大约能够表示绝对值不超过2.1*10^9的整数 long long 占用空间8字节,64位,
阅读全文
摘要:CSP-J 2021 T1 题目链接:https://www.luogu.com.cn/problem/P7909?contestId=54994 #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #inclu
阅读全文