码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
天梯赛L3-025 那就别担心了 (30 分)
链接:https://pintia.cn/problem-sets/994805046380707840/problems/1336215880692482060 思路: 代码: #include<bits/stdc++.h> using namespace std; vector<int>ve[1 ...
分类:其他好文   时间:2021-04-24 13:26:55    阅读次数:0
后缀数组
后缀数组构造方法: 1.倍增 直接参考刘汝佳蓝书 时间复杂度不优秀,但代码实现简单,细节处理较多,建议参考思路后背过代码。 #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstring ...
分类:编程语言   时间:2021-04-24 13:23:55    阅读次数:0
复习类的几个基本函数
考个研真的把很多东西都忘光了,,, #include <string_view> #include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; class Sampl ...
分类:其他好文   时间:2021-04-23 12:18:50    阅读次数:0
D. Cut(倍增) from Codeforces Round #717 (Div. 2)
做法:记录每个点i向左与它最近的不互质的数j,从j+1到i是可以分成1块的。 对于每次询问,从r开始一直贪心往前跳,每跳一步ans++;但这样一步一步跳会T,需要去倍增优化。 #include<bits/stdc++.h> using namespace std; #define ll long l ...
分类:其他好文   时间:2021-04-23 12:09:38    阅读次数:0
__cxa_demangle
typeid操作符可以用来获取一个类型/表达式的名称: #include <iostream> #include <typeinfo> using namespace std; int main() { std::cout << typeid(int).name() << std::endl; re ...
分类:其他好文   时间:2021-04-23 12:05:50    阅读次数:0
Escape HDU - 3533
原题链接 考察:搜索 思路: 预处理有子弹和城堡的坐标,这部分除了暴力没有更好的办法.因为还有一个时间限制,所以需要三维数组.剩下就是BFS. 剪枝: 1.相同时间的拜访点不必再访问. 2.当离终点的曼哈顿距离>能量 不必再走下去. 注意:城堡处一定要预处理再判断子弹. 1 #include <io ...
分类:其他好文   时间:2021-04-22 16:32:51    阅读次数:0
Codeforces Round #717 (Div. 2) A B C 题解
A Tit for Tat 题意:给你一个n个数的数组,在k次操作下,每次可以选2个数,一个+1,一个-1,求如何让数组前面的数最小,后面的数最大。最小不能为0. 思路:模拟,把前面的数-掉都加在最后一个数上 #include<iostream> using namespace std; int n ...
分类:其他好文   时间:2021-04-22 16:23:39    阅读次数:0
"双指针"去重有序数组
此处双指针代表的是一种思想,即两个(或多个)"先锋"动态式跟随并进行信息交流[个人理解],样例如下: 先输入数组大小,然后依次赋值(按照升序) ①若不得有重复元素,代码如下: 1 #include<iostream> 2 using namespace std; 3 4 const int N = ...
分类:编程语言   时间:2021-04-22 16:22:56    阅读次数:0
sizeof
#include <stdio.h> #include <iostream> using namespace std; class abc { private: int a; int b; }; int main() { cout << "Hello, World!" << endl; cout < ...
分类:其他好文   时间:2021-04-22 15:25:05    阅读次数:0
c语言中continue语句
c语言中continue语句;执行continue语句后,循环体的剩余部分就会被跳过。 例子; 1、原始程序。输出矩形。 #include <stdio.h> int main(void) { int i, j, height, width; puts("please input the heigh ...
分类:编程语言   时间:2021-04-22 15:24:21    阅读次数:0
84546条   上一页 1 ... 38 39 40 41 42 ... 8455 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!