码迷,mamicode.com
首页 >  
搜索关键字:const    ( 26295个结果
《51nod1237 最大公约数之和 V3》
好题: #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 5e6 + 5; const LL Mod = 1e9 + 7; #define INF 1e9 #define dbg(x) c ...
分类:其他好文   时间:2020-11-01 22:04:43    阅读次数:23
P1160 队列安排
方法:双链表 #include<iostream> using namespace std; const int N = 100010; int e[N], l[N], r[N], idx; int value_node[N]; int n; void add(int x, int v){ valu ...
分类:其他好文   时间:2020-11-01 20:56:06    阅读次数:15
【题解】[USACO08DEC-Gold] Trick or Treat on the Farm
「[USACO08DEC-Gold] Trick or Treat on the Farm」题解 By 5ab as a juruo. ...
分类:其他好文   时间:2020-11-01 10:05:14    阅读次数:8
P4995 跳跳
题目描述你是一只小跳蛙,你特别擅长在各种地方跳来跳去。这一天,你和朋友小 F 一起出去玩耍的时候,遇到了一堆高矮不同的石头,其中第 i 块的石头高度为 hi,地面的高度是 h0=0。你估计着,从第 i 块石头跳到第 j 块石头上耗费的体力值为 (hi?hj)^2,从地面跳到第 i 块石头耗费的体力值 ...
分类:其他好文   时间:2020-11-01 09:48:37    阅读次数:12
P4514 上帝造题的七分钟 | 二维前缀和板子
# include <bits/stdc++.h> using namespace std; const int N = 2050; int n,m; int lowbit(int x) {return x & -x;} struct _2wBIT { int a[N][N]; void clear ...
分类:其他好文   时间:2020-11-01 09:41:49    阅读次数:19
C# 的 readonly 和 const 关键字
1、静态常量和动态常量 ? 在c#语言中,有两种类型的常量,分别是运行时常量和编译时常量; ? 静态常量就是编译时常量,程序一经编译,常量即被赋值,并且不可修改。只能是BCL(Base Class Library)中的基础类型。 ? 动态常量就是运行时常量,程序运行时进行赋值,赋值完成后无法更改,也 ...
分类:Windows程序   时间:2020-11-01 09:28:02    阅读次数:27
POJ2785 4 Values whose Sum is 0 (二分)
题意:给你四组长度为$n$序列,从每个序列中选一个数出来,使得四个数字之和等于$0$,问由多少种组成情况(仅于元素的所在位置有关). 题解:$n$最大可以取4000,直接暴力肯定是不行的,我们可以先对后两个数组$c$和$d$,枚举他们每个元素的和,用一个新数组$CD$记录,然后再去枚举$a$和$b$ ...
分类:其他好文   时间:2020-10-31 01:32:05    阅读次数:17
Segment Tree Beats!(吉司机线段树)
Segment Tree Beats $Q1.$给定长度为$n$的序列$A$,支持以下操作:1、区间取$\min$;2、区间查询最大值;3、区间求和。 const int N = 1000005; const int inf = 1<<30; int n, m, a[N]; #define lc ( ...
分类:其他好文   时间:2020-10-31 01:22:28    阅读次数:19
编程技巧
关于线程创建函数pthread_create #include<pthread.h> int pthread_create(pthread_t *tidp, const pthread_attr_t *attr, void *(*start_rtn)(void*), void *arg); // 第 ...
分类:其他好文   时间:2020-10-30 13:18:56    阅读次数:37
图书管理前端页面
图书管理前端页面 1.图书管理页面 1.1 http/apis.js 添加后端请求路由 import { get, post, put, del } from './index'// 书籍管理接口export const getBookList = (params, headers) => get( ...
分类:其他好文   时间:2020-10-30 12:30:39    阅读次数:19
26295条   上一页 1 ... 67 68 69 70 71 ... 2630 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!