A.牛妹爱整除 莽一波就过了??? https://ac.nowcoder.com/acm/contest/3405/A #include <bits/stdc++.h> using namespace std; int K; int main() { scanf("%d", &K); printf ...
分类:
其他好文 时间:
2020-01-16 17:21:42
阅读次数:
96
title: cppPrimer学习11th date: 2020/1/11 14:07:51 toc: true cppPrimer学习11th [TOC] 知识点 map与pair的关系: map的元素是pair,一个pair就是一个模版结构体,有两个数据对 11.1 11.2 11.3 11. ...
分类:
其他好文 时间:
2020-01-15 23:16:34
阅读次数:
91
题解:求最小生成树的最大权值边 ①n<=50000,用二维数组会编译出错,开不了50000*50000这么大的数组 ②用Vector+优先队列 优化Prim即可得正解,一定要用优先队列优化,否则会超时! ③可以用struct Node,也可以用Pair优化 #include <stdio.h> #i ...
分类:
其他好文 时间:
2020-01-14 21:05:09
阅读次数:
113
题目很简单。差点10题,非常可惜。 A: 签到题+4不应该。 solver:lzh 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef pair<int, int> pii; 4 typedef long long ll; 5 #d ...
分类:
其他好文 时间:
2020-01-14 20:29:35
阅读次数:
108
``` #include #include #include using namespace std; //map m; mapa; void Insert(){ //两种插入方法 //一: a.insert(pair("Tom",1));//("Tom" -> 1) a.insert(pair("... ...
分类:
其他好文 时间:
2020-01-13 19:44:11
阅读次数:
80
T1 与或和 2s&&512MB 简明题意:求一个矩阵的所有子序列的 $and$和 和$or$和; 子矩阵的$and$和就是所有值$and$起来;$or$类似; 矩阵边长$n define ll long long define mp make_pair using namespace ...
分类:
其他好文 时间:
2020-01-12 20:11:28
阅读次数:
79
题目如下: We are given a list nums of integers representing a list compressed with run-length encoding. Consider each adjacent pair of elements [a, b] = [ ...
分类:
Web程序 时间:
2020-01-12 18:18:25
阅读次数:
91
题目: Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explanation: 'e' appears ...
分类:
编程语言 时间:
2020-01-12 09:51:15
阅读次数:
93
24. 两两交换链表中的节点 https://leetcode cn.com/problems/swap nodes in pairs/ | 难度 | 完成日期 | 耗时 | 提交次数 | | | | | | | 中等 | 2020 1 11 | 0.5小时 | 2 | 问题描述 给定一个链表,两两 ...
分类:
其他好文 时间:
2020-01-11 22:19:03
阅读次数:
86
迪杰斯特拉优化版本:vector + 优先队列 △迪杰斯特拉算法的核心:每次找距离s点最短的元素 + 松弛操作 ①要用优先队列取出最短距离降低时间复杂度,用veotor减少空间 ②定义一个pair类型,作为优先队列的元素。typedef pair<int , int > P ,first是距离,se ...
分类:
编程语言 时间:
2020-01-11 20:46:40
阅读次数:
121