Ajls's Blog 
  • 主页
  • 归档
  • 标签
  • 关于
  • 友链
  •   
  •   

二分图匹配模板

1.匈牙利算法 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152#include<bits/stdc++.h>using namespace std;typedef long long ll;#define endl '\n'

2021-11-17
formwork 模板

网络流模板

1.dinic 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859const int MAXN = 2e3 + 5;const int INF = 0x3f3f3f3f;struct Edge{ int to,val

2021-11-17
formwork 模板

字典树模板

模板来源:HKer_YM的博客1.指针建树 12345678910111213141516171819202122232425262728293031323334struct node { node* child[MAXN]; int flag; node() { memset(child, NULL, sizeof(child));

2021-11-16
formwork 模板

马拉车算法模板

模板来源:HKer_YM的博客1.求最长回文长度或回文子串个数 123456789101112131415161718192021222324252627282930313233343536373839404142434445//求回文串的个数inline int Manacher(string s){ //转换字符串 memset(hw, 0, sizeof(hw));

2021-11-16
formwork 模板

并查集模板

1.并查集 123456789101112const int MAXN = 1e5 + 5e2;int bin[MAXN];inline int find (int x) { return bin[x] == x ? x : (bin[x] = find(bin[x]); }inline void merge(int a, int b) { int fa = find

2021-11-16
formwork 模板

各种筛法模板

模板来源:HKer_YM的博客1.线性筛 1234567891011121314151617181920212223242526// 复杂度: O(n)void init() { phi[1] = 1; for (int i = 2; i < MAXN; ++i) { if (!vis[i]) { phi[i] = i - 1; p

2021-11-16
formwork 模板

博客搭建

1.安装Nodejs我用的是ubuntu,所以直接apt 1$ sudo apt install nodejs 1.2安装npmnpm是nodejs的包管理工具 1$ sudo apt install npm 2.安装hexo这里建站是使用hexo快速生成的 1$ sudo npm install --unsafe-perm --verbose -g hexo 2.1然后初始化 1234$ he

2021-11-12
web

2020杭电多校联合训练6 1006 hdu-6832 A Very Easy Graph Problem

题目链接:点击跳转 Problem Description Input Output Sample Input 123456789101112131415161718192021222324252643 20 1 0 3 13 27 61 0 1 0 0 1 01 22 32 41 55 65 77 61 0 1 1 0 1 01 22 32 41 55 65 74 31 0 1 01 23 42

2021-05-19
acm

Palindromic Matrix

time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output InputThe first line contains one integer n (1≤n≤20). The second line contains n2 integers a1

2021-05-17
acm codeforces

CF1118D2 Coffee and Coursework (Hard Version)(二分)

题目描述 Input The first line of the input contains two integers n and m (1≤n≤2⋅105, 1≤m≤109) — the number of cups of coffee and the number of pages in the coursework. The second line of the input contain

2021-05-17
acm codeforces
12345

Search

总访问量 次 总访客数 人
浙ICP备20029441号-3