码迷,mamicode.com
首页 >  
搜索关键字:struct tm    ( 20030个结果
2020.07.30【省选B组】模拟 总结
今天真$TM$又菜鸡了,无路赛无路赛。 估分:$100 + 0 + 40 = 140$ 考场:$30 + 0 + 40 = 70$ \(T1\) 算错时间复杂度了。。。我的莫队+倍增(看上去很高级的做法)是$O(n*sqrt(n)*logn)$,极限$19s$。。。 无语了,正解是线段树或者分块+\ ...
分类:其他好文   时间:2020-07-30 18:11:51    阅读次数:57
Kruskal算法
#include <bits/stdc++.h> #define MAXN 200005 using namespace std; int node,edge,ans=0,k=0; int fat[MAXN],siz[MAXN]; struct EDGE { int from,to,cost; } ...
分类:编程语言   时间:2020-07-30 01:20:30    阅读次数:71
链表(c语言实现)
节点的数据结构 struct Node { int value; struct Node* next; }; typedef struct Node Node; 操作和演示 #include <stdlib.h> #include <stdio.h> // 建立一个节点 Node *createNo ...
分类:编程语言   时间:2020-07-30 01:18:43    阅读次数:82
[模板]计算几何
struct point{ double x, y; }; struct line{ double A, B, C;//Ax + By + C = 0; }; line PPL(point a, point b){// 两点确定直线的一般式 if(a.x == b.x) return line{1, ...
分类:其他好文   时间:2020-07-29 17:50:20    阅读次数:62
【剑指offer】链表的基本操作之创建、插入、删除
// C++ #include<iostream> using namespace std; //链表的定义 struct ListNode { int val; ListNode* next; ListNode(int n) :val(n), next(nullptr) {} }; //链表的打印 ...
分类:其他好文   时间:2020-07-29 09:59:12    阅读次数:68
Map 与结构体的混合使用
#include <iostream> #include <map> using namespace std; typedef struct alertInfo { double alertUp; double alertDown; alertInfo(double up, double down) ...
分类:其他好文   时间:2020-07-28 22:25:22    阅读次数:75
数据结构C语言实现----图
邻接表储存结构 /*邻接表的边*/ typedef struct ArcNode { int adjvex; struct ArcNode *next; }ArcNode; /*邻接表的结点*/ typedef struct VNode { char date; ArcNode *firstarc; ...
分类:编程语言   时间:2020-07-28 17:32:12    阅读次数:91
[USACO15JAN]Grass Cownoisseur G
题目 原题链接 解说 刷$Tarjan$题的时候看到的题目,第一次见到把分层图和$Tarjan$结合的题目,觉得这样的思路很有趣,写博客以记之。 总思路:建双层图->Tarjan缩点->最长路 首先看到题目中“只能走一次的逆向边”这样的条件,我们会很自然地想到建一个分层图。每一个点$i$在第二层有一 ...
分类:其他好文   时间:2020-07-28 17:19:27    阅读次数:69
二叉苹果树
#include<bits/stdc++.h> using namespace std; const int N=450; struct data { int to,stb,vol; } a[N]; int head[2*N],root,tot,v[N],f[N][101],n,p,o[N]; in ...
分类:移动开发   时间:2020-07-28 16:55:50    阅读次数:98
哈希表的运算算法
一、开放定址法构造的哈希表的运算算法 1、哈希表类型 #define NULLKEY-1 //定义空关键字 #define DELKEY-2 //定义被删关键字 typedef int KeyType; //关键字类型 typedef struct { KeyType key; //关键字域 int ...
分类:编程语言   时间:2020-07-28 14:17:47    阅读次数:71
20030条   上一页 1 ... 47 48 49 50 51 ... 2003 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!