题目链接:https://ac.nowcoder.com/acm/problem/16564 题目大意: 有n天可以租教室,给出每天可以租用的教室数量,有m次询问,找出最小值判断能不能完成租借。思路:线段树求区间最小值。(模板) #include <cstdio> #include <iostrea ...
分类:
其他好文 时间:
2020-07-08 01:10:26
阅读次数:
83
一.简单实现 需求:根据 flume 监控 exec 文件的追加数据,写入 kafka 的 test-demo 分区,然后启用 kafka-consumer 消费 test-demo 分区数据。 需求分析 1)flume的配置文件 在hadoop102上创建flume的配置文件 # define a ...
分类:
Web程序 时间:
2020-07-07 23:22:58
阅读次数:
79
1.发现conda不能用 参考的博客:https://www.jianshu.com/p/13f5d20e61f8 https://www.jianshu.com/p/92b11e25bc14 zsh:command not find:conda 的详细解决办 open ~/.zshrc expor ...
分类:
系统相关 时间:
2020-07-07 00:29:41
阅读次数:
86
题意: 定义$f_{d}(n)$为所有小于n且与n互质的正整数的d次方之和。 给定$d,n=\prod \limits_{i=1}^{w}{p_{i}^{a_{i}}}$,求$f_{d}(n)$对$10^{9}+7$取模的值。 $d\leq 100,w\leq 1000,p_{i},a_{i}\le ...
分类:
其他好文 时间:
2020-07-06 23:56:19
阅读次数:
92
....又是以前虐过我的期末习题..哪里摔倒就哪里爬起来吧 1 #include<iostream> 2 #include<math.h> 3 #define N 1e-3 4 using namespace std; 5 6 bool IsZero(double a){ 7 return abs( ...
分类:
其他好文 时间:
2020-07-06 19:27:38
阅读次数:
42
题目 function Foo() { getName = function () { alert (1); }; return this; } Foo.getName = function () { alert (2);}; Foo.prototype.getName = function () ...
分类:
编程语言 时间:
2020-07-06 15:52:24
阅读次数:
44
.h { #ifndef __LUA_YFFMPEG_H__ #define __LUA_YFFMPEG_H__ #ifdef __cplusplus extern "C" { #endif #include "tolua++.h" #ifdef __cplusplus } #endif TOLUA ...
分类:
其他好文 时间:
2020-07-05 23:16:34
阅读次数:
78
注释 单行注释 当行注释用两个斜线 (//) 多行注释 多行注释用一对斜杠和星号表示(/**/) 变量 创建变量的语法: 数据类型 变量名 = 变量初始值; 例如: int age = 18; 常量 用于记录程序中不能改变的数据,常量的定义方式有两种: #define宏常量 语法: #define ...
分类:
编程语言 时间:
2020-07-05 23:08:59
阅读次数:
75
C语言实现线性表栈 //栈--线性表实现 #define ERROR -1 typedef int Position; typedef int ElemType; struct SNode{ ElemType *Data; Position Top; int MaxSize; }; typedef ...
分类:
编程语言 时间:
2020-07-05 19:24:06
阅读次数:
64
inline是什么?在c++中inline关键字用来定义一个类的内联函数,引入它的主要原因是用它替代C中表达式形式的宏定义。 取代这种形式的原因如下: 1. C中使用define这种形式宏定义的原因是因为,C语言是一个效率很高的语言,这种宏定义在形式及使用上像一个函数,但它使用预处理器实现,没有了参 ...
分类:
其他好文 时间:
2020-07-05 17:46:29
阅读次数:
82