模拟退火
万欧(矩阵状态快速转移方法)
模拟费用流,最小割
后缀自动机
DFA 最小化
信息论
dp 常见步骤:
- 设计
- 状态
- 扫描压缩信息状态(顺序)
- 子问题(倍增)
- 转移
- 枚举状态、子集、关键点
- 状态
- 优化
“如果你与 OI 的关系靠暴力维持,那么它毫无意义”
“最怕你一生碌碌无为,却总安慰自己平凡可贵”
换个题解
问人
问ai
换个题
从上到下执行
OI/OJ/辅助网站
拼题A - PTA
LCA 省选集训营
LCA 省选集训营补题集
Beamer 和 一些模板
洛谷年度报告
树干计划(822455242)
Mars OJ(勰码)
核桃编程 OJ
洛谷 Markdown 格式手册
LaTexLive
OIer Db
原题机
超级原题机
图论建模网站
画板
数学绘图网站
流程图在线制作 与 流程图绘制的基本规则
AtCoder 题目汇总
综合题单
AtCoder
CodeForces
Virtual Judge
杭电(HD)OJ
OI Wiki
Hello CTF
contest(正睿OJ),qq群:392616894
SHOJ(上海)
集训队论文集
超好玩的代码大全
颜文字
警示后人
一、
错误的TLE方法:
multiset<haha> st;
multiset<haha>::iterator it;
it = lower_bound(st.begin(), st.end(), haha(a[i].y, i));时间复杂度:
正确的AC方法:
multiset<haha> st;
multiset<haha>::iterator it;
it = st.lower_bound(haha(a[i].y, i));时间复杂度:
————源码参照P2906
大佬祭坛orz
哇,是大佬orz!
还是大佬orz!
讨论神坛
1085549
SUPER文章
致天堂的信 与 天堂的回信
提示是对前辈的认可,过审是对前辈的不舍。
主定理 与 扩展主定理
五大渐近记号详解
VS Code 配置
古希腊掌管 Linux 的神
信仰的力量
网络流全篇讲解
SPFA 期望复杂度证明
平面图转对偶图(最左转线)及点定位
记一类树上点覆盖问题
导数的圣剑
电磁学神力
带删线性基
树状数组(包括二维)
高维偏序/数点详细解析
递推法解决整数划分问题
DDP 圣剑
“支配对”学习笔记
宏 的力量
如何优雅地生成一棵树
卡常
指令集
线性规划
洛谷帮手插件
君のQQ
乱七八糟
这个人很懒,什么都写了50216 540494462
"""义已失吾亦死!亦久亦旧罢以龄。"""
ycpc05-17
mQOyVL
‘ad hoc’在剑桥词典中的解释:not regular or planned, but happening only when necessary
卡常和捆绑是 OI 娘调教 OIer 的一种方式,但由于大多数 OIer 不是抖 M ,所以 OI 娘的调教方式会令 OIer 难受。
无执故无失,我思故我在。
互联网有利也有弊,有些人只看见利,可弊呢?可弊坠机了;有些人只看见弊,可利呢?可利在原神里;而有些人讲究平衡,看见弊就利了。 就是要善用“利大于弊”田忌赛马式的妙比法。用你的利去比他人的弊,比弊时,压力即刻骤减;用你的弊去比他人的利,比利时,是位于欧洲西部的一个国家。
生乎吾前,其能力也固强乎吾,吾是废物之;生乎吾后,其能力也亦强乎吾,吾是废物之。吾是傻逼,夫庸知其年之先后生于吾乎?
我:奶奶,他怎么做到的?
奶奶指了一下旁边烧开水的水壶
我:您是说他熟能生巧吗 ?
奶奶摇头:开了
AC = Answer Coarse = 粗劣的答案
WA = Wonderful Answer = 完美的答案
TLE = Time Limit Enough = 时间充裕
MLE = Memory Limit Enough = 内存充裕
CE = Compile Easily = 轻松通过编译
RE = Run Excellently = 完美运行
AC = Apareciym 显形咒
CE = Crucio 钻心咒 (CO 是 Colloportus 禁锢咒)
PE = Petrificus 石化咒
RE = Reducto 粉碎咒
WA = Wingardium Leviosa 悬浮咒
MLE = Muggle-Repelling 驱逐咒
TLE = Tarantollegra 舞步咒
OLE = Obliviate 遗忘咒
AC : 通过(Accepted,AC)
WA : 答案错误(Wrong Answer,WA)
TLE : 超时(Time Limit Exceed,TLE)
OLE : 超过输出限制(Output Limit Exceed,OLE)
MLE : 超内存(Memory Limit Exceed,MLE)
RE : 运行时错误(Runtime Error,RE)
PE : 格式错误(Presentation Error,PE)
CE : 无法编译(Compile Error,CE)
“According to the latest information, the enemy destroyed strongholds Nos. 45 and 171, and our troops still stubbornly resisted and repaired strongholds 37 and 98. Is it possible to counterattack now? ”
“No,sir.”
“The enemy army destroyed the wormhole from Stronghold No. 33 to Stronghold No. 42, can you counterattack now?”
“No,sir.”
“We have repaired Stronghold No. 42, can we counterattack?”
“No,sir.”
“Our …”
“No,sir.”
“Comrade, do you just keep answering ‘no’? Have you judged the situation well? This is a time when the country is in peril…”
“Sir, you know I’m not very clever and didn’t find a way to calculate the result quickly and correctly, but according to a certain statistic, if I keep answering ‘NO’, the probability of being completely correct in a battle is 45%.”
“So …”
“No,sir.”
#include <bits/stdc++.h>
using namespace std;
const int maxn = 236, screenLimitTimes = 65;
bitset<maxn> a, b, c;
void getParameter (int &len1, int &len2, int &num, double &speed) {
printf ("You wanna the first width : ");
cin >> len1;
printf ("\nYou wanna the second width : ");
cin >> len2;
printf ("\nYou wanna the number : ");
cin >> num;
printf ("\nYou wanna the speed : ");
cin >> speed;
printf ("\n");
}
void init (int num, int len1, int len2) {
for (int i = 1; i <= num; i ++) {
for (int j = (maxn / num) * (i - 1); j < (maxn / num) * (i - 1) + len1; j ++) {
a.set(j);
}
for (int j = (maxn / num) * (i - 1); j < (maxn / num) * (i - 1) + len2; j ++) {
b.set(j);
}
}
}
inline void mix_up (string &s) {
s = a.to_string();
string zc = b.to_string();
for (int i = 0; i < maxn; i ++) {
if (zc[i] == '1') s[i] = '2';
else if (s[i] == '0') s[i] = '9';
}
}
inline void outSee (string &s, bool &A, bool &B) {
if (a[maxn - 1]) A = true;
if (b[0]) B = true;
a <<= 1;
b >>= 1;
if (A) {
A = false;
a.set(0);
}
if (B) {
B = false;
b.set(maxn - 1);
}
mix_up(s);
cout << s << endl;
}
void firstSeeScrean(string &s, bool &A, bool &B) {
for (int i = 1; i <= screenLimitTimes; i ++) {
outSee (s, A, B);
}
}
int main () {
int len1, len2, num;
double speed;
getParameter(len1, len2, num, speed);
init(num, len1, len2);
string s;
mix_up(s);
cout << s << endl;
bool a_out = 0, b_out = 0;
firstSeeScrean(s, a_out, b_out);
while (1) {
outSee(s, a_out, b_out);
_sleep(speed);
}
return 0;
}

