常规并查集 模板 #define Maxsize 100+1 int f[Maxsize]; void init(int n){ for(int i = 1; i <= n; i++) f[i] = i; } int find_f(int a){ if(f[a] == a){ return a; } ...
分类:
其他好文 时间:
2020-07-16 11:58:56
阅读次数:
105
1.区间求和 2.区间取模 3.单点修改 线段树,区间取模加一个剪枝:区间最大值<mod,不修改。其他单点取模 #include <bits/stdc++.h> using namespace std; #define debug printf("bug!!!\n"); typedef long l ...
分类:
其他好文 时间:
2020-07-16 11:50:06
阅读次数:
63
一个数最多能取8-9次根号。 #include <bits/stdc++.h> using namespace std; #define debug printf("bug!!!\n"); typedef long long ll; const int MAXN=1e5+10; const ll M ...
分类:
其他好文 时间:
2020-07-16 10:11:53
阅读次数:
74
ylbtech-专业词语-计算机:Lambda表达式 Lambda 表达式(lambda expression)是一个匿名函数,Lambda表达式基于数学中的λ演算得名,直接对应于其中的lambda抽象(lambda abstraction),是一个匿名函数,即没有函数名的函数。Lambda表达式可 ...
分类:
其他好文 时间:
2020-07-16 00:12:00
阅读次数:
62
#define DIV_ROUND_UP(x,y) (((x) + ((y) - 1)) / (y)) 1、问题 x、y都是整数,且x > 1, y > 1,求 x / y的向上取整,即: 当 x / y整除时,向上取整值为 x / y; 当x / y不整除时,向上取整值为(x / y) + 1; ...
分类:
其他好文 时间:
2020-07-15 22:53:23
阅读次数:
57
##题目大意 用栈的形式给出一棵二叉树的建立的顺序,求这棵二叉树的后序遍历 ##tips string用printf输出:printf(“%s”, str.c_str()); ##AC代码 #define _CRT_SECURE_NO_WARNINGS #include<iostream> #inc ...
分类:
其他好文 时间:
2020-07-15 22:48:44
阅读次数:
44
var exp=undefinded; if(typeof(exp)=="undefined") { //变量是undefined的处理 } typeof 返回的是字符串,有六种可能:"number"、"string"、"boolean"、"object"、"function"、"undefined ...
分类:
编程语言 时间:
2020-07-15 15:38:30
阅读次数:
72
###Windows驱动 // type.h #ifndef TYPE_H #define TYPE_H #include <setupapi.h> struct wdi_device_info { struct wdi_device_info *next; unsigned short vid; ...
@echo off chcp 936 1>nul 2>nul set url=%~1 if NOT DEFINED url ( echo input URL exit /b ) :start set tmp=%random%_%random%_%random% set tmpfn=%tmp%.txt ...
分类:
其他好文 时间:
2020-07-15 10:46:42
阅读次数:
160
#include<stdio.h> #define maxsize 6 typedef int ElemType; typedef struct { ElemType data; int cur; } component; //1.创建备用链表 void reserverArr(component ...
分类:
其他好文 时间:
2020-07-15 01:21:11
阅读次数:
58