当前位置:网站首页>Postgraduate entrance examination directory link
Postgraduate entrance examination directory link
2022-07-01 06:33:00 【Keep--Silent】
List of articles
301
Advanced mathematics
linear algebra
probability theory
408
data structure
operating system
Chapter I overview of computer system
Chapter 2 processes and threads
Chapter 3 memory management
Chapter IV document management
Chapter V input / Output (I/O) management
#include<bits/stdc++.h>
using namespace std;
#define fir first
#define sec second
#define ll long long
#define debug(x) {
cout<<#x<<" = "<<x<<" ";}
#define debug1(a) {
debug(a);cout<<endl;}
#define debug2(a,b) {
debug(a);debug1(b);}
#define debug3(a,b,c) {
debug(a);debug2(b,c);}
#define debug4(a,b,c,d) {
debug(a);debug3(b,c,d);}
#define debugvector(x) {
cout<<#x<<": ";for(int asd=0;asd<x.size();asd++)cout<<x[asd]<<" ";cout<<endl;}
#define debugvec(x,n) {
cout<<#x<<": ";for(int asd=0;asd<n;asd++)cout<<x[asd]<<" ";cout<<endl;}
#define debugvp(x){
cout << #x << ": "; for (int asd = 0; asd < x.size(); asd++) printf("{%d,%d} ",x[asd].fir,x[asd].sec) ; cout << endl; }
#define debugmap(q) {
cout<<#q<<": ";for(auto x:q) printf("{%d,%d} ",x.first,x.second) ;cout<<endl; }
int lb(int i) {
return i & -i; }
void update(int i, int x) {
while (i <= n)vt[i] += x,i+=lb(i); }
int get(int i) {
int ans = 0;
while (i)ans += vt[i], i -= lb(i);
return ans;
}
ll qpow(ll x,ll n){
ll ans=1;
while(n){
if(n%2==1)ans=ans*x;
x=x*x;
n/=2;
}
return ans;
}
ll jc(int x,ll mol){
ll ans=1;
while(x>0)ans*=x--,ans%=mol;
return ans;
}
ll eular(ll n){
// Euler function , Pray with n The number of Coprime
ll ans = n;
for(int i=2; i*i <= n; ++i)
{
if(n%i == 0)
{
ans = ans/i*(i-1);
while(n%i == 0)
n/=i;
}
}
if(n > 1) ans = ans/n*(n-1);
return ans;
}
upper_bound() Function returns an iterator , Point to the key value in the container >key The first element of .
lower_bound() Function returns an iterator , Point to the key value in the container >=key The first element of .
num[upper_bound(num,num+size,a-1)-num-1]
ll gcd(ll a,ll b){
if(a<b)return gcd(b,a);
if(b==0)return a;
return gcd(b,a%b);
}
fraction inter = new fraction(numstring[0]);
for(int i=0;i<ans.size();i++){
cout<<ans[i];
if(i==ans.size()-1)cout<<endl;
else cout<<" ";
}
int gcd(int a,int b){
if(a<b)return gcd(b,a);
if(b==0)return a;
return gcd(b,a%b);
}
const int MANX=1010;
ll C[MAXN][MAXN];
void zuheshu(int MAXN,ll mol){
int i,j;
for(i=0;i<MAXN;i++){
C[i][i]=C[i][0]=1;
for(j=1;j<i;j++){
C[i][j]=(C[i-1][j-1]+C[i-1][j])%mol;
}
}
}
vector<int> zhishu(int n) {
int i,flag;
vector<int>v;
for(i=2; i<=n; i++) {
flag=1;
for(int j=0; j<v.size()&&v[j]*v[j]<=i; j++)
if(i%v[j]==0) {
flag=0;
break;
}
if(flag)v.push_back(i);
}
return v;
}
int getMax(int l, int r)
{
int mid=log2(r-l+1);
return max(num[mid][l],num[mid][r+1-(1<<mid)]);
}
int to = log2(n);
for (int j = 1; j <= to; j++)
{
for (i = 1;i+(1<<j)-1<=n; i++)
{
num[j][i] = max(num[j - 1][i], num[j - 1][i + (1 << (j - 1))]);
}
}
string a_to_b(string s, int a, int b) {
int ans = 0, i;
int k = 1;
int t;
for (i = s.size() - 1; i >= 0; i--) {
if (s[i] >= '0' && s[i] <= '9')t = s[i] - '0';
else t = s[i] - 'A'+10;
ans +=t* k;
k *= a;
}
k = 1;
string s2="";
while (ans) {
t = ans % b;
if (t <= 9)s2 += '0' + t;
else s2 += +'A' - 10+t;
ans /= b;
}
if (s2.size() == 0)s2 = "0";
return s2;
}
struct matrix {
ll num[10][10];
int n,m;
struct matrix operator *(struct matrix b) {
struct matrix c;
c.n=n;
c.m=b.m;
for(int i=0; i<c.n; i++)
for(int j=0; j<c.m; j++)
c.num[i][j]=0;
for(int i=0; i<n; i++) {
for(int j=0; j<b.m; j++) {
for(int k=0; k<m; k++) {
c.num[i][j]+=num[i][k]*b.num[k][j];
c.num[i][j]%=mod;
}
}
}
return c;
}
};
边栏推荐
- 软件工程领域的名词描述
- Discrimination between left and right limits of derivatives and left and right derivatives
- [wechat applet] to solve button, input and image components
- Internet worm
- 产品学习(二)——竞品分析
- Is the account opening of Huafu securities safe and reliable? How to open Huafu securities account
- How did ManageEngine Zhuohao achieve the goal of being selected into Gartner Magic Quadrant for four consecutive years?
- [unity shader amplify shader editor (ASE) Chapter 9]
- Forkjoin and stream flow test
- Code power is full of quantitative learning | how to find a suitable financial announcement in the financial report
猜你喜欢
随机推荐
C#如何打印輸出原版數組
虚幻 简单的屏幕雨滴后处理效果
[unity shader custom material panel part II]
异常检测方法梳理,看这篇就够了!
@Transactional的传播属性REQUIRES_NEW深入理解
TCL statements in SQL (transaction control statements)
sci-hub如何使用
[ManageEngine] how to realize network automatic operation and maintenance
VS2019如何永久配置本地OpenCV4.5.5使用
json模块
PAT (Advanced Level) Practice 1057 Stack
If I am in Guangzhou, where can I open an account? Is it safe to open an account online?
产品学习(一)——结构图
请求模块(requests)
三说 拷贝构造之禁用
数据库产生死锁了请问一下有没有解决办法
Async and await
Discrimination between left and right limits of derivatives and left and right derivatives
On siem
SQL语句









