随笔分类 - 模拟
摘要:[link](https://codeforces.com/contest/1851) #### A 非常简单的比较大小问题 ```cpp #include #include #include #include #include #include #include #include #include
阅读全文
摘要:[Miku](https://codeforces.com/contest/1853/problem/C) 一道逆向思维的题目。 我们假设最后的最小的数是个1,放在第一个位置上,然后我们往数列开头按照规则插入0,其中应该插在这个1后面的,我们视为无效插入,插在这个1前面的,我们视为有效插入。 显然随
阅读全文
摘要:Jinnie 处理出所有可能的品,然后尺取法找所有的正好n个的地方,取答案 正确性?假如正确答案不是n个连在一起,那么中间无论多了谁,一定会不止多一个 并且一定会存在一种n个在一起的更优解 #include<iostream> #include<cstdio> #include<vector> #i
阅读全文
摘要:Lisa 显然对于每一个时刻,可以调到的温度是一个区间 那么这样来做的话,我们只需要算出这个区间,然后去就可以了 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #define int long
阅读全文
摘要:blackpink 显然不过我们应该优化成 采用树上启发式合并 仿照树链剖分的思想,对于每一个位置,我们先处理所有的轻儿子,然后处理重儿子,统计当前节点的答案,最后把轻儿子删掉就可以了。 这样全局一个桶就够用了。 #include<iostream> #inclu
阅读全文
摘要:Archie 显然这玩意可以胡搞 怎么搞 模拟退火基本知识 #include<iostream> #include<cstdio> #include<algorithm> #include<cmath> using namespace std; double delat=0.993; double
阅读全文
摘要:Archie 很简单的小模拟 我们把每四位数和一个:作为一段进行处理 小小的特判 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; string s; int a[9]; int main(){
阅读全文
摘要:Aimee 模拟即可 #include<iostream> #include<algorithm> #include<cstring> #include<cstdio> using namespace std; int n,m,k,p; int a[110001]; int b[110001]; s
阅读全文
摘要:Aimee 真不知道和dp有啥关系 两个关键值,区间和和区间最小值 那么直接左右扩展一个点能作为最小值的最大区间(反正是正整数) 然后算就行了 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; t
阅读全文
摘要:py是个神奇的语言 为什么input默认读字符串 为什么range左闭右开 C++可控制性似乎比它高 也可能只是我水平不够用 强制换行和没有一对括号是挺爽的 VSC万岁 scz=input() a=[int(i) for i in scz.split()] #数组还能这么初始化真没想到msplit是
阅读全文
摘要:Aimee 很简单的模拟 ######(未提交) #include<iostream> #include<cstdio> #include<algorithm> using namespace std; int n,m,k,p; int main(){ scanf("%d%d%d%d",&n,&m,
阅读全文
摘要:Aimee map出奇迹 #include<iostream> #include<cstdio> #include<map> using namespace std; map <char,int> m; map <int,char> mm; string s,ans; int main(){ m['
阅读全文
摘要:Aimee 水到家了 #include<iostream> #include<cstdio> using namespace std; long long n; int main(){ scanf("%lld",&n); if(n%4==0){ cout<<n; return 0; } if(n%4
阅读全文
摘要:Aimee 这个题只是凑数的 因为我不想一道题没过 #include<iostream> using namespace std; long long x[100005],y[100005]; long long xx[1005],yy[1005]; long long i,j; long long
阅读全文
摘要:Aimee 很水的题目 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int n; int Aimee[50]; int p; int ans; int m
阅读全文
摘要:Miku 推一个小式子就知道了 计算出最后的位置,然后从后往前比较。 #include<iostream> #include<cstdio> #include<algorithm> using namespace std; long long last[100001]; long long n,m;
阅读全文
摘要:Miku 恶心的小模拟 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<map> using namespace std; string a,b,c; map <char,char>
阅读全文
摘要:链接:Miku 暴力模拟 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<map> #include<cstring> using namespace std; int n,m; i
阅读全文
摘要:Miku 暴力出奇迹,打表拿省一 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> using namespace std; int a[30]={0,1,1,2,2,3,4,6,9,14,22,35,
阅读全文