码迷,mamicode.com
首页 >  
搜索关键字:define    ( 25272个结果
5-22 习题训练题解
A题,看题目的意思应该是有解的,n的范围又是1e9,所以算出从2的一次方到2的三十次方依次的和在判断哪一个合适就可以。 #include<bits/stdc++.h> using namespace std; #define LL long long int main() { LL a[100]; ...
分类:其他好文   时间:2020-05-25 17:22:30    阅读次数:49
Let和Const区别,详细版本
let:声明的是变量1、不存在变量提升 // var 的情况 console.log(foo); // 输出undefined var foo = 2; // let 的情况 console.log(bar); // 报错ReferenceError let bar = 2; 上面代码中,变量foo ...
分类:其他好文   时间:2020-05-25 10:56:46    阅读次数:59
hashmap
hashmap.h #ifndef foohashmaphfoo #define foohashmaphfoo /* $Id: hashmap.h 90 2004-07-17 14:12:30Z lennart $ */ /*** This file is part of polypaudio. p ...
分类:其他好文   时间:2020-05-24 23:58:38    阅读次数:81
几何+矩形交——icpc nwerc 2019 I
老套路了。 用二分求答案,judge时把每个点转换成矩形,最后看n个矩形是否有交点 #include<bits/stdc++.h> using namespace std; #define N 3005 #define ll long long struct Point{ll x,y;}c; str ...
分类:其他好文   时间:2020-05-24 19:27:58    阅读次数:75
【思维】图论+dp——icpc 2019 nwerc J
/* 从后往前依次确定,i->j直接连边只会增加一种路线 */ #include<bits/stdc++.h> using namespace std; #define N 505 char s[N][N]; int n,w[N][N],mp[N][N],t[N][N]; int main(){ c ...
分类:其他好文   时间:2020-05-24 16:53:52    阅读次数:69
树链剖分
树链剖分 DFS序 先来讲一讲DFS序是什么东西,直接上图,方便理解。 估计巨巨们应该知道了DFS序的两个重要的东西,$in,out$数组。 $in$数组就是这个点进入DFS的时间。 $out$数组就是这个点退出DFS递归栈的时间。 这个时间要注意,当有点进入的时候才加,没有点进入的时候不加也不减。 ...
分类:其他好文   时间:2020-05-24 11:48:39    阅读次数:46
闯(2.2)
#include<conio.h> #include<bits/stdc++.h> #include<windows.h> #define CIN freopen("CONIN$", "r+t", stdin); #define COUT freopen("CONOUT$", "w+t", stdo ...
分类:其他好文   时间:2020-05-24 11:43:24    阅读次数:58
箭头函数与this指向问题
箭头函数中this的指向问题 1. 箭头函数不会改变this的指向,在它外面拿到的this是什么,它里面获取到的就是什么 2. setTimeout方法挂载在window上面,高程中写道, 超时调用的代码都是在全局作用域下执行 ,非严格模式下this指向window对象,严格模式下为undefine ...
分类:其他好文   时间:2020-05-24 09:36:19    阅读次数:37
树形dp——游族杯 D
只有三种情况:全是1,有一个2的,只有一个点的 树形dp求最长的1链,或者带一个2的最长1链即可 #include<bits/stdc++.h> #define rep(i,x,y) for(auto i=(x);i<=(y);++i) #define dep(i,x,y) for(auto i=( ...
分类:其他好文   时间:2020-05-24 00:13:52    阅读次数:54
主席树板子
//贴个主席树板子#include<bits/stdc++.h> using namespace std; #define pb push_back #define sc(x) scanf("%lld",&x); #define int long long #define fi first #def ...
分类:其他好文   时间:2020-05-24 00:11:36    阅读次数:47
25272条   上一页 1 ... 86 87 88 89 90 ... 2528 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!