problem 1010. Pairs of Songs With Total Durations Divisible by 60 参考 1. leetcode_1010. Pairs of Songs With Total Durations Divisible by 60; 完 ...
分类:
其他好文 时间:
2020-07-09 22:47:52
阅读次数:
73
链表总结 链表基础 如何实现一个单链表 #include "bits/stdc++.h" using namespace std; struct MyListNode { int data; MyListNode *next; MyListNode(int left = -1, MyListNode ...
分类:
其他好文 时间:
2020-07-09 22:31:25
阅读次数:
55
最短路算法(三)Dijkstra算法 PS:因为这两天忙着写GTMD sagment_tree,所以博客可能是sag+图论混搭着来,另外sag的基本知识就懒得整理了…… Part 1:Dijkstra算法基本信息 以下,我们用dis[n]表示1->n的最短路径长度,vis[n]表示n号节点有没有被访 ...
分类:
编程语言 时间:
2020-07-09 12:17:08
阅读次数:
123
最短路模型 #include<cstring> #include<iostream> #include<algorithm> using namespace std; typedef pair<int,int> PII; const int N = 110; int n,m; int g[N][N] ...
#include<iostream> #include<cstring> #include<algorithm> #include<cmath> #include<cstdlib> #include<climits> #include<stack> #include<vector> #include ...
分类:
其他好文 时间:
2020-07-05 19:30:34
阅读次数:
54
一、迭代器,insert 添加元素。 #include <map> #include <string> #include <iostream> #include <vector> #include <set> using namespace std; int main() { /********** ...
分类:
编程语言 时间:
2020-07-04 22:19:26
阅读次数:
73
题目:传送门 思路: 1. 对于s[i] = t[i] 我们不需要处理,那么去掉s[i] = t[i]后,我们能够处理的子序列必定是 10101010... 或 01010101... ; 如果是 s' = 1100 , t' = 0011 显然不能。 2. 那么我们得出这一条结论了,这道题的做法就 ...
分类:
其他好文 时间:
2020-07-02 16:54:07
阅读次数:
59
Marriage Match IV 思路:属于最短路径上的边应该满足:dis_A[u] + dis_B[v] + w == dis_A[B],dis_A是出发点到其他点的距离,dis_B是终点到其他点的距离,u,v是边的两个端点,w是权值。题目说每条边只能用一次,我们可以用最大流算法来求最短路径有几 ...
分类:
其他好文 时间:
2020-07-01 17:23:25
阅读次数:
54
提升开发效率的插件 1. Better Comments Better Comments 你可以使用不同的前缀来让注释显示为不同的颜色。非常适合快速扫描并发现重要的代码片段。若使用的话, 建议团队统一规范. 2. Bracket Pair Colorizer 你是否经常在项目中出现查找是否缺失括号. ...
分类:
其他好文 时间:
2020-06-30 00:53:02
阅读次数:
208
题目链接:https://codeforces.com/contest/1354 想法: 很明显的权值线段树(值域线段树)板子题。 #include <algorithm> #include <string> #include <cstring> #include <vector> #include ...
分类:
其他好文 时间:
2020-06-30 00:43:08
阅读次数:
58