海上月
C++ inline关键字 C++ inline关键字
inline关键字在函数声明和定义加上,使之称为内联函数。如果一些简单的函数直接在类中声明并且定义,编译器可以将其优化为内联函数。 注:内联函数可以减少函数的执行时间:原因是它可以在使用时直接进行替换(像宏一样展开),从而避免出现参数压
2023-03-13
C++_中数据类型大小(所占用字节数) C++_中数据类型大小(所占用字节数)
代码#include<iostream> using namespace std; #define str(type) #type #define sz(type) cout<< str(type) <<
2023-06-22
C++_中explicit的作用及用法(虽然简单,但是还是有用的) C++_中explicit的作用及用法(虽然简单,但是还是有用的)
目录 C++explicit(官网的说法) explicit specifier C++explicit 清楚的说法(建议英文不好的从这里开始食用哦) explicit作用: explicit使用注意事项: C++explicit使
2023-06-22
C++_std::array用法 C++_std::array用法
Array简介std::array is a container that encapsulates fixed size arrays. Defined in header [<array>](https://en.cpp
2023-06-22
c++_allocator类 c++_allocator类
目录 std::allocator::allocate c++中的allocator类 概述 allocator用法 详解 allocate用于分配原始内存 Return value 在STL中也会用allocate类 std::al
2023-06-22
1020._月饼_(25)-PAT乙级真题 1020._月饼_(25)-PAT乙级真题
1020. 月饼月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼。现给定所有种类月饼的库存量、总售价、以及市场的最大需求量,请你计算可以获得的最大收益是多少。 注意:销售时允许取出一部分库存。样例给出的情形是这样的
2022-12-02
1015_Reversible_Primes(20) 1015_Reversible_Primes(20)
1015_Reversible_Primes(20)DescribeA reversible prime in any number system is a prime whose “reverse” in that number sy
2022-09-17
1007_Maximum_Subsequence_Sum(最大连续子段和) 1007_Maximum_Subsequence_Sum(最大连续子段和)
1007_Maximum_Subsequence_Sum(最大连续子段和)Given a sequence of K integers { N1​, N2​, …, NK​ }. A continuous subsequence is
2022-08-11
10 / 10