码迷,mamicode.com
首页 >  
搜索关键字:xunsearch namespace    ( 41960个结果
树状数组求逆序对个数
#include<cstdio> #include<algorithm> const int N = 1e6 + 1; int n, t[N]; namespace lsh{ int lsh[N], tmp[N]; void init() { for (int i = 1; i <= n; ++i) ...
分类:编程语言   时间:2021-04-10 13:40:10    阅读次数:0
HJ8-合并表记录
按照key值升序输出: #include<iostream> using namespace std; #include<map> int main() { map<int,int>m; int n; cin >> n; while(n--) { int a = 0, b = 0; cin >> a ...
分类:其他好文   时间:2021-04-10 13:21:54    阅读次数:0
天梯赛 L3-016 二叉搜索树的结构
#include <bits/stdc++.h> using namespace std; template<class ElemType> struct BiNode { ElemType data; BiNode<ElemType> *lchild, *rchild; int disToLeft ...
分类:其他好文   时间:2021-04-10 13:18:26    阅读次数:0
Win2D 投影效果 ShadowEffect
<Page x:Class="Win2DDemo.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/ ...
分类:Windows程序   时间:2021-04-10 12:59:49    阅读次数:0
POJ 3259
这几天转去尝试做leetcode,意外发现其实leetcode题做做还是挺有收获的,不过感觉OJ做起来收获更大些,这两个还是结合起来做好点。 这道题思路还是比较清晰的,利用bellman ford的思路,不过因为图可能不连通,所以参考kuangbin大佬的思路加了一个“超级源”(因为此题只需要判断负 ...
分类:其他好文   时间:2021-04-09 13:20:46    阅读次数:0
单词的提取
#include #include<stdio.h> #include #include #include//按字典序输出 using namespace std; vector words; map<string,bool > dic; int main() { //连续读入字符 string w ...
分类:其他好文   时间:2021-04-09 13:13:53    阅读次数:0
[模板]链式向前星
我以前和你一样也是个vectorer,直到我膝盖中了一TLE. Invitation Cards 这道题目,8s的时限,1e6的数据,只不过是跑了两边DIjkstra,vector超时,而向前星只需要2s. 同样是邻接表存图,链式向前星虽然没有vector那么简洁,但是速度会有明显提升,并且许多操作 ...
分类:其他好文   时间:2021-04-08 14:03:54    阅读次数:0
const 小知识点(二): 修改const修饰的变量会怎样?
当const修饰全局变量时,修改它会怎么样? 看如下代码: 1 #include <iostream> 2 using namespace std; 3 4 const double a = 10.5; 5 6 int main() { 7 double* p = const_cast<double ...
分类:其他好文   时间:2021-04-08 13:49:55    阅读次数:0
P1605 迷宫
吐槽 最后的BFS和DFS了,做完这个开始搞模拟!!! DFS 注意检查的是新坐标!!! 1 #include<bits/stdc++.h> 2 using namespace std; 3 int sx,sy,ex,ey; 4 int maps[6][6]; 5 int dir[4][2]={ 6 ...
分类:其他好文   时间:2021-04-08 13:47:42    阅读次数:0
P1596 [USACO10OCT]Lake Counting S
#include<bits/stdc++.h> using namespace std; int dir[8][2]={ {1,1}, {1,-1}, {1,0}, {0,1}, {0,-1}, {-1,-1}, {-1,0}, {-1,1} }; char maps[101][101]; int ...
分类:其他好文   时间:2021-04-08 12:57:57    阅读次数:0
41960条   上一页 1 ... 20 21 22 23 24 ... 4196 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!