C++ 内联函数 #include <iostream> using namespace std; inline int Max(int a, int b) { if (a > b) return a; else return b; } int main() { cout << Max(23, 5) ...
分类:
其他好文 时间:
2020-11-25 12:08:44
阅读次数:
2
label { font-size: 0.28rem; display: inline-block; width: 0.95rem; text-align: justify; text-align-last: justify; } ...
分类:
Web程序 时间:
2020-11-24 12:40:10
阅读次数:
11
1.通过rqt_graph指令,可以看到ROS节点之间的关系 从上图中可以看到,有两个节点/teleop_turtle 和 /turtlesim /teleop_turtle节点发布话题,话题名为/turtle1/cmd_vel /turtlesim订阅了该节点 我们已知/teleop_turtle ...
比赛链接:https://codeforces.com/contest/1440 A. Buy the String 题解 枚举字符串中 $0$ 或 $1$ 的个数即可。 代码 #include <bits/stdc++.h> using namespace std; int main() { io ...
分类:
其他好文 时间:
2020-11-21 12:41:54
阅读次数:
32
@(C++内联函数) #include <iostream> using namespace std; inline int Max(int a, int b) { if (a > b) return a; else return b; } int main() { cout << Max(23, ...
分类:
编程语言 时间:
2020-11-21 12:39:21
阅读次数:
17
###P3899 [湖南集训]谈笑风生 二维数点问题,主席树模板(两种写法 #include<bits/stdc++.h> #define IL inline #define LL long long #define pb push_back using namespace std; const i ...
分类:
其他好文 时间:
2020-11-21 12:15:18
阅读次数:
7
2020年11月16日16:11:06 尽量用const和inline而不用#define 尽量用编译器而不用预处理。 尽量用<iostream>而不用<stdio.h> scanf和printf很有用,但不是类型安全的,而且没有扩展性。 on the other hand,①有些iostream的 ...
分类:
编程语言 时间:
2020-11-20 12:22:07
阅读次数:
24
全部内容在《数学手册》, 内容暂时不全, 因要考试, 故暂时只先整理可能用得到的, 等考完试再把全部公式补上 首先回顾一下泰勒展开式: 设函数 \(f(x)\) 在 \(x_0\) 的某个邻域 \(O(x_0, r)\) 中能展开幂级数, 则它的幂级数展开就是 \(f(x)\) 在 \(x_0\) ...
分类:
其他好文 时间:
2020-11-20 11:38:09
阅读次数:
4
问$n$的排列,满足不超过$k+1$段极长的连续段组成,这里的连续段定义为相邻两个数的差值绝对值不超过$1$。 \(n\le 2*10^5\) 设恰好$k$段组成的方案数为$f_k$,至多$k$段组成的方案数为$g_k$。 显然有$g_k=x^kk!$。化下式子得$g_=k!\sum_k2i(-1) ...
分类:
其他好文 时间:
2020-11-20 11:25:19
阅读次数:
5
%matplotlib inline import matplotlib.pyplot as plt plt.plot(xx,yy_train_loss,"r", label = "train_loss") plt.plot(xx,yy_valid_loss,"b", label = "valid_ ...
分类:
其他好文 时间:
2020-11-17 13:00:36
阅读次数:
26