随笔分类 -  模拟

摘要:由于最近快要考ccsp了 前几次都在大模拟上吃了亏 最近练习用java和python写一些 201912-3 化学方程式 class Element: def __init__(self, CH): self.ch = CH def __str__(self): return self.ch def 阅读全文
posted @ 2020-10-04 19:41 一入OI深似海 阅读(251) 评论(0) 推荐(0)
摘要:题目名称 笔记 括号 城堡可执行文件名 note brackets castle输入文件名 note.in brackets.in castle.in输出文件名 note.in brackets.out castle.in每个测试点时限 1 秒 1 秒 1 秒内存限制 512MB 512MB 512 阅读全文
posted @ 2016-11-13 17:50 一入OI深似海 阅读(261) 评论(1) 推荐(0)
摘要:题目名称 加密 冒泡排序图 重建可执行文件名 encrypt bubble rebuild输入文件名 encrypt.in bubble.in rebuild.in输出文件名 encrypt.in bubble.out rebuild.in每个测试点时限 1 秒 1 秒 1 秒内存限制 512MB 阅读全文
posted @ 2016-11-12 18:44 一入OI深似海 阅读(232) 评论(0) 推荐(0)
摘要:/*洛谷 U4792 Acheing 二维线段树 n*n*logn*logn T成傻逼2333 */ #include #include #include #define maxn 1010 #define lc k*2 #define rc k*2+1 #define mid (l+r)/2 using namespace std; int n,m,k,g[maxn][maxn],x,y,z;... 阅读全文
posted @ 2016-11-08 17:54 一入OI深似海 阅读(279) 评论(0) 推荐(0)
摘要:NP(np)Time Limit:1000ms Memory Limit:64MB题目描述LYK 喜欢研究一些比较困难的问题,比如 np 问题。这次它又遇到一个棘手的 np 问题。问题是这个样子的:有两个数 n 和 p,求 n 的阶乘对 p 取模后的结果。LYK 觉得所有 np 问题都是没有多项式复 阅读全文
posted @ 2016-11-07 09:13 一入OI深似海 阅读(289) 评论(0) 推荐(0)
摘要:P76竞赛时间: ????年??月??日??:??-??:?? 他【问题描述】一张长度为N的纸带, 我们可以从左至右编号为0 − N( 纸带最左端标号为0)。 现在有M次操作, 每次将纸带沿着某个位置进行折叠, 问所有操作之后纸带的长度是多少。【输入格式】第一行两个数字N, M如题意所述。接下来一行 阅读全文
posted @ 2016-11-07 09:10 一入OI深似海 阅读(326) 评论(0) 推荐(0)
摘要:【问题描述】 祖玛是一款曾经风靡全球的游戏,其玩法是:在一条轨道上初始排列着若干个彩色珠子,其中任意三个相邻的珠子不会完全同色。此后,你可以发射珠子到轨道上并加入原有序列中。一旦有三个或更多同色的珠子变成相邻,它们就会立即消失。这类消除现象可能会连锁式发生,其间你将暂时不能发射珠子。 开发商最近准备 阅读全文
posted @ 2016-10-29 20:49 一入OI深似海 阅读(412) 评论(0) 推荐(0)
摘要:WPS转word太丑了 凑合看喽 第二题 【题目描述】 给你两个日期,问这两个日期差了多少毫秒。 【输入格式】 两行,每行一个日期,日期格式保证为“YYYY-MM-DD hh:mm:ss ”这种形式。第二个日期时间一定比第一个日期时间要大两个日期的年份一定都是 21 世纪的年份。 【输出格式】 一行 阅读全文
posted @ 2016-10-29 18:58 一入OI深似海 阅读(339) 评论(0) 推荐(0)
摘要:enc【问题背景】zhx 和他的妹子聊天。【问题描述】考虑一种简单的加密算法。假定所有句子都由小写英文字母构成,对于每一个字母,我们将它唯一地映射到另一个字母。例如考虑映射规则:a->b, b->c, c->d, d->a. 那么单词 bad 就会被映射为 cba。这个映射规则的“逆映射规则”为: 阅读全文
posted @ 2016-10-26 16:30 一入OI深似海 阅读(415) 评论(0) 推荐(0)
摘要:/* 好题啊 好题啊 而然还是看了一眼题解啊 有那么一点思路 但是离写出代码还很远 考虑必须分开放倒两个栈里的情况 即存在i #include #include #define maxn 1010 using namespace std; int n,m,a[maxn],num,head[maxn],color[maxn],mx[maxn][25],P[maxn],falg; int s1[ma... 阅读全文
posted @ 2016-10-10 21:55 一入OI深似海 阅读(163) 评论(0) 推荐(0)
摘要:/*bzoj 1613*/ /*暴力5884ms*/ #include #define maxn 10010 using namespace std; int n,m,a[maxn],f[maxn][510]; int max(int x,int y){ return x>y?x:y; } int main() { scanf("%d%d",&n,&m); for(int... 阅读全文
posted @ 2016-09-29 22:12 一入OI深似海 阅读(351) 评论(0) 推荐(0)
摘要:/*考场上写的暴力 40分钟70分*/ #include #include #include #define base 1000000000 #define maxn 100010 #define ll long long using namespace std; ll n,m,h[maxn],X,A[maxn],B[maxn],st,ans; bool falg; double mii=ba... 阅读全文
posted @ 2016-08-13 17:49 一入OI深似海 阅读(558) 评论(3) 推荐(1)
摘要:/* 这题10^8的暴力可以出答案 但是 慢..... 有个小小的bug 出题人卡int 却没注意short 用short可以不用hash 直接搞 49428K 313MS */ #include #include #include #define base 12500000 using namespace std; int a1,a2,a3,a4,a5,x1,x2,x3,x4,x5,ans; ... 阅读全文
posted @ 2016-08-12 21:28 一入OI深似海 阅读(192) 评论(0) 推荐(0)
摘要:/*考试想了2小时二分 最后写的15分钟暴力....34分*/ #include #include #include #include using namespace std; int n,m,k,cnt,ks[11],sk[11]; string s,si; void Get_s(int x) { string sd; while(x)sd+=char(x%10+'0'),x/... 阅读全文
posted @ 2016-08-04 17:15 一入OI深似海 阅读(225) 评论(0) 推荐(0)
摘要:/* 一开始的思路 求出每两个点之间的距离(其实枚举两个点就T了) 统计为2 的点对 然后统计答案 倍增LCA的话 是O(n+n*n) 后面的n*n是枚举那两个点 华丽的T了 60分 */ #include #include #include #define maxn 200010 using namespace std; int n,w[maxn],fa[maxn][20],head[ma... 阅读全文
posted @ 2016-07-07 17:56 一入OI深似海 阅读(207) 评论(0) 推荐(0)
摘要:/* Bfs+Hash 跑的有点慢 但是codevs上时间限制10s 也ok */ #include #include #include #include #define maxn 10000010 using namespace std; int len; bool f[maxn]; string ls,rs; struct node { int step,place; st... 阅读全文
posted @ 2016-06-11 20:38 一入OI深似海 阅读(457) 评论(1) 推荐(0)
摘要:/* 这题并没有A掉 自己电脑上运行ok提交就不对 预处理攻击范围 然后模拟 求大神看看有没有错误 Orz */ #include #include #include #define ll long long using namespace std; ll g[25][25],ans=-10000000; int n,m,f[125][125],px,py; char s; ll F(int... 阅读全文
posted @ 2016-05-29 18:07 一入OI深似海 阅读(136) 评论(0) 推荐(0)