Ajls's Blog
  • 主页
  • 归档
  • 类别
  • 标签
  • 关于

字典树模板

模板来源: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

Hdu多校8-1009 hdu-6863 Isomorphic Strings

题目链接:点击跳转 Problem DescriptionInput OutputFor each test case, output one line containing ‘’Yes’’ or ‘’No’’ (without quotes). Sample Input 1234567891011121361a2aa3aab4abba6abcbcc8aaaaaaaa Sample Output
2021-05-15
#acm

树状数组模板

1.区间更新求区间和 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N = 5e
2020-11-14
#模板 #formwork
1…3456

Search

浙ICP备20029441号
浙ICP备20029441号 | police-icon 浙ICP备20029441号