cf
111
2020100XWH
这个作者很懒,什么都没留下…
展开
-
【无标题】
Problem - C - Codeforces 对于可能的简单题,猜结论(若正常思路复杂度太大 如这里就猜只加a或者b #include<bits/stdc++.h> using namespace std; int main () { int t; int a,b,i=0; cin>>t; while(t--) { i=0; cin>>a>>b; int an.原创 2022-01-31 12:01:41 · 948 阅读 · 0 评论 -
思维构造题)
题意:给一个数列,给你最多n次提问其中k个位序(k已知),返回升序排列时第m(未知)个大的位序和数值 策略:因为不可能k=n那无法求出 所以k+1<=n 因此选取前k+1位序,取k+1次,将这个k+1项作升序考虑,去掉某一项后,第m个可能为排序后的第m位序或者m+1位序,若删去的是1到m(闭)则为m+1因此后者会出现m次(即为目标答案) 而后者的特征即为数值大于前者,而又只会出现两个值,因此只要计数大者的次数即可 思维构造+位序条件的干扰(实际只需排序考虑即可) 有时候求出某个值不一定非得原创 2021-09-24 12:01:38 · 68 阅读 · 0 评论 -
概率计算)
题意理解,每个积累是可以独立进行的,原始概率来进行概率推断,不会不断更新。 英文小心题意 也可配合可解的角度理解题意 #include<bits/stdc++.h> using namespace std; double a[505][505]; double p[505*2],q[505];//long long 不够 int n,k; void dp() { for(int i=2;i<=n;++i) for(int j=1;j<i;++j) {..原创 2021-09-09 21:23:09 · 56 阅读 · 0 评论 -
造数据 改输出 debug 麻烦但重要
#include<bits/stdc++.h> using namespace std; const int maxn=200000+10; long long n,T; struct one{ long long a,t; bool operator<(const one&x)const { if(this->t==x.t) return this->a<x.a; else return this->t<x.t; } }ones.原创 2021-09-03 09:15:17 · 37 阅读 · 0 评论