03 2022 档案
摘要:#include<iostream> #include<algorithm> #include<complex> using namespace std; using PDD=pair<double,double>; const int N=1e3+10; const double eps=1e-6
阅读全文
摘要:#include<iostream> #include<algorithm> #include<queue> #include<vector> using namespace std; using PII=pair<int,int>; const int N=5e4+10; int n,id[N];
阅读全文
摘要:#include<iostream> #include<algorithm> #include<map> #include<cstring> using namespace std; using PII=pair<int,int>; const int N=2e3+510; int n,m; PII
阅读全文
摘要:#include<iostream> #include<algorithm> using namespace std; using ll= long long; const int N=5e5+10; int n,m,ans; ll T,w[N],t[N],tmp[N]; ll sq(ll x){
阅读全文
摘要:#include<iostream> #include<algorithm> #include<cstring> #include<cstdlib> using namespace std; using ll = long long; const int N = 5e2 + 10; int n, m
阅读全文
摘要:spacedesk 有点毒瘤,校园网可以窥屏
阅读全文
摘要:#include<iostream> #include<algorithm> using namespace std; const int N= 5e5+3e3; using ll=long long ; ll n,m,i,j,k,a[N],b[N],cnt=0; void merge(ll a[]
阅读全文
摘要:code #include<iostream> #include<algorithm> #include<queue> #include<vector> #define fir(i,a,b) for(int i=a;i<=b;++i) using namespace std; priority_qu
阅读全文
摘要:code #include<iostream> #include<algorithm> using namespace std; const int N = 100010; typedef long long ll; ll res1,res2; int row[N],col[N],tmp[N]; i
阅读全文
摘要:
阅读全文
摘要:code #include<iostream> #include<algorithm> using namespace std; const int N=1e5+10; int n,res=0; int a[N]; int main(){ ios::sync_with_stdio(false); c
阅读全文
摘要:2,某模型 机 有 8 条 指 令I1 ~I8,它 们 的 使 用 频 度 分 别 为 0.3,0.3,0.2,0.1,0.05,0.02,0.02,0.01。 (1)试分别用 Huffman编码和平均码长最短的等长扩展码(限定为两种码长)对其操作码进行编码。 (2)分别计算 Huffman编码和等
阅读全文
摘要:code #include<iostream> #include<algorithm> using namespace std; int n, m, k, tot = 0; const int N = 2e5 + 50; //languige come from scientiet,audio an
阅读全文
摘要:code // Forward declaration of compare API. // bool compare(int a, int b); // return bool means whether a is less than b. class Solution { public: vec
阅读全文
摘要:code #include<iostream> #include<algorithm> using namespace std; const int N = 1e5 + 10; int cows[N]; double sum[N]; int n, m; bool check(double avg)
阅读全文
摘要:code #include<iostream> #include<algorithm> #include<set> using namespace std; const int N=1e4+10; set<pair<int,int>> existed; int n,p,h,m; int c[N],d
阅读全文
摘要:code #include<iostream> #include<algorithm> using namespace std; using ll=long long; const int N=110000; ll n,m,i,j,p,q,a[N]; //p为b序列中正数之和,而q为b序列中负数之和
阅读全文
摘要:Q A #include<iostream> #include<cstring> #include<algorithm> using namespace std; const int N = 5e3 + 10; int s[N][N]; int n, r; int main() { ios::syn
阅读全文
摘要:Q A #include<iostream> #include<complex> #include<iomanip> using namespace std; using LL = long long ; using PLL = pair<LL,LL>; PLL calc(LL n,LL m){ i
阅读全文
摘要:#include<iostream> using namespace std; #define Mod 9901 #define ll long long int a,b; int ksm(int a,int b){ int ans=1; a%=Mod; while(b){ if(b&1){ ans
阅读全文
摘要:Q 你玩过“拉灯”游戏吗? 25 盏灯排成一个 5×5 的方形。 每一个灯都有一个开关,游戏者可以改变它的状态。 每一步,游戏者可以改变某一个灯的状态。 游戏者改变一个灯的状态会产生连锁反应:和这个灯上下左右相邻的灯也要相应地改变其状态。 我们用数字 1 表示一盏开着的灯,用数字 0 表示关着的灯。
阅读全文
摘要:code #include<iostream> using namespace std; const int N=10; int path[N]; int state[N]; int n; void dfs(int u){ if(u>n){ for(int i=1;i<=n;++i){ cout<<
阅读全文
摘要:code #include<iostream> #include<algorithm> using namespace std; #define rep(i,a,b) for(int i=(a);i<=(b);++i) #define dwn(i,a,b) for(int i=(a);i>=(b);
阅读全文
摘要: 
阅读全文
摘要:
阅读全文
摘要:特性 支持latex link https://www.freeplane.org/wiki/index.php/Home
阅读全文
摘要:code #include<algorithm> #include<cstring> #include<iostream> using namespace std; const int N=20,M=1<<N; int f[M][N],w[N][N]; int main(){ ios::sync_w
阅读全文
摘要:code #include<iostream> #include<cstring> #define ll long long using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); ll a,b,p,res=
阅读全文
摘要:code #include<iostream> #include<algorithm> using namespace std; #define ull unsigned long long ull quick_pow(ull a,ull b,ull p){ ull res=1; while(b){
阅读全文
摘要:code #include<iostream> #include<cstring> #include<algorithm> using namespace std; int n,m,ans,num; struct land{ int x,y,t; }; land island[100005]; in
阅读全文
摘要:ref tip 运用非严格弱序判定任何a,b关键字都认为是不相等的。 这样的非严格弱序方法带来的问题 有序关联容器不允许存在相同的关键字,在用非严格弱序函数判断时,会认为相同的关键字是不相等的,因此会将两个相同的关键字插入容器中,这个行为是未定义的
阅读全文
摘要:code #include<iostream> #include<algorithm> #include<complex> using namespace std; const int N= 2000000; int p[N+1]={0}; unsigned long long S[N+1]; in
阅读全文