自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 收藏
  • 关注

转载 Ubuntu 18.04 安装 mysql

最近安装mysql遇到了一系列的坑,我发誓再也不想花费数个上午来做这些事了。最初图方便使用 sudo apt-get mysql-common mysql-server mysql-client等命令,然而装下来的根本没办法使用。然后发现官方网站有提供apt支持的.deb文件Download MySQL APT Repository最后选择去官方网站提供的方法进行安装...

2019-04-08 11:26:00 78

转载 CodeForces 846D. Monitor(二维线段树)

题目大意:给予n,m,k,t 和 t 行i,j,val代表第i行j列的元素会在val天后损坏。求在整张(n*m)图中求一个k*k的区域的数全部损坏的最小天数。试了一下二维线段树,总结一下就是和一维的差别不大,从二叉树变成了四叉树(三维线段树岂不是要八叉树,丧心病狂)。总体上就是把一个长方形均分四块,然后总的节点数就是一个首项为[max(n*m)^2]公比为1/4的等比数列前若干项和,具体...

2018-10-31 16:43:00 136

转载 CodeForces 1045A. Last chance(线段树+网络流SAP)

网络流,对三种武器分别有不同建图的方法,核心宗旨是:源点->武器->飞船->汇点。SQL rockets – every SQL rocket can destroy at most one spaceship in the given set.Cognition beams – every Cognition beam has an interval [l...

2018-10-26 14:42:00 103

转载 BZOJ 1013: [JSOI2008]球形空间产生器sphere (解方程)

1013: [JSOI2008]球形空间产生器sphereTime Limit: 1 SecMemory Limit: 162 MBSubmit: 7277Solved: 3931[Submit][Status][Discuss]Description  有一个球形空间产生器能够在n维空间中产生一个坚硬的球体。现在,你被困在了这个n维球体中,你只知道球面上...

2018-10-01 12:34:00 79

转载 ACM-ICPC 2018 北京网络赛:K-Dimensional Foil II

#1835 : K-Dimensional Foil II时间限制:1000ms单点时限:1000ms内存限制:256MB描述"K-Dimensional Foil" is a dimensional weapon. Its function is quite easy: It can ascend a region in 3D spa...

2018-09-22 20:44:00 95

转载 HDU 3308 LCIS

题目大意:给予一个序列,两种操作·查询 L-R 中的最长严格递增连续子序列的长度·更改 LOC 的字符为X经典的线段树区间合并,线段树种一共有三个数组no[]当前 L到R中的最大值ls[]从左数的最大长度rs[]从右数的最大长度#include <iostream>#include <stdio.h>#include &lt...

2018-08-24 11:28:00 51

转载 HDU 6435 CSGO

按照我们蒟蒻菜队的核心思想(排序贪心)来搞这个题,首先想到暴力的方法,然后不用说肯定会TLE。。然后加一波玄学排序,标准就是 武器点数+Σ|(主武器的属性值-副武器相应属性的平均值)|,这样第一个不总是正解,因为可能会有这样的情况2 2 10 2330 3460 1230 456主武器最大值和最小和平均值比较偏离情况是一样的,既然正解不出现在第一对,那第二...

2018-08-23 09:25:00 67

转载 BZOJ 5293 求和(LCA)

5293: [Bjoi2018]求和Time Limit: 20 SecMemory Limit: 512 MBSubmit: 203Solved: 128[Submit][Status][Discuss]Descriptionmaster 对树上的求和非常感兴趣。他生成了一棵有根树,并且希望多次询问这棵树上一段路径上所有节点深度的k次方和,而且每次的k...

2018-08-10 14:59:00 66

转载 HDU 3338 Kakuro Extension(网络流)

因为某个地方m写成n玄学调bug一个小时...写完内心是崩溃的...#include<iostream>#include<cstdio>#include<cstring>#include <list>#include <algorithm>#include <vector>#inc...

2018-08-09 20:23:00 44

转载 POJ 1220 NUMBER BASE CONVERSION(进制转换,大数)

输入输入如题面,注意对0的处理,然后Java大数真好用。import java.math.BigInteger;import java.util.Arrays;import java.util.*;import java.io.*;public class Main{ static int valOfChar(char a){ if...

2018-08-08 01:59:00 63

转载 HDU 1535 Invitation Cards(最短路)

题目读了半天,发现是从1到 2 ~n个点再从 2 ~n个点回到1的最短路。。所以正向反向分别建图,跑最短路就好了。#include <algorithm>#include <queue>#include <cstring>#include <iostream>using namespace std;typ...

2018-08-07 16:19:00 74

转载 HDU 3572 Task Schedule(网络流+当前弧优化)

网络流入门题目,抽象建边的过程有些困难,外加当前弧优化就过去了(没有这个会T)#include <algorithm>#include <iostream>#include <cstring>#include <queue>#include <map>#include <set>#in...

2018-08-04 10:55:00 57

转载 HDU 2363 Cycling (最短路 + 暴力枚举)

给与n座山头m条路,求高度差最小的前提下的最短路。。用dijkstra记录上个节点最高最低点/二分上下界 WA了一辈子,最后发现数据规模其实很小。直接枚举每一个上下界得到结果即可。双向边,双向边,双向边。#include <algorithm>#include <queue>#include <iostream>#inc...

2018-08-03 01:37:00 62

转载 POJ 1789 (最小生成树 Prim)

题目描述:给予n个长度为7的字符串,定义两字符串间的代价为同一位置不同的字符的个数,现在要联通所有的字符串求最小代价。 思路:一开始使用Krustal算法,然而因为是稠密图导致TLE,换用Prim。Krustal:(TLE)#include <cstdio>#include <algorithm>#include <iostream...

2018-08-01 23:07:00 86

转载 HDU 6333 Harvest of Apples

场上怎么都想不出来,看了标程想自闭。。。#include <algorithm>#include <iostream>#include <cstdio>#include <vector>#include <cmath>using namespace std;#define N 100005#d...

2018-08-01 19:49:00 56

转载 HDU 2227 Find the nondecreasing subsequences(dp+线段树维护)

Find the nondecreasing subsequencesTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2225Accepted Submission(s): 862Problem Descript...

2018-08-01 10:09:00 67

转载 HDU 3549 Flow Problem(网络流Dinic)

题目描述:给予一张图,源点 1,汇点 n 求最大流。标准模板题,附上封装好的Dinic模板。#include <algorithm>#include <iostream>#include <cstring>#include <queue>#include <map>#include <...

2018-08-01 09:23:00 78

转载 网络流:棋盘V

问题 A: 棋盘V时间限制: 1 Sec内存限制: 128 MB提交: 192解决: 7[提交] [状态] [讨论版] [命题人:admin]题目描述有一块棋盘,棋盘的边长为100000,行和列的编号为1到100000。棋盘上有n个特殊格子,任意两个格子的位置都不相同。现在小K要猜哪些格子是特殊格子。她知道所有格子的横坐标和纵坐标,但并不知道对应关系。换言之,...

2018-07-31 15:51:00 93

转载 POJ 3667 Hotel

HotelTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 19938Accepted: 8653DescriptionThe cows are journeying north to Thunder Bay in Canada to gai...

2018-07-27 12:01:00 44

转载 数据结构:链表

//// Created by DevilInChina on 2018/6/25.//#include <iostream>#include <algorithm>#include <functional>using namespace std;template <typename T>class ...

2018-07-27 00:45:00 43

转载 基础算法:堆排序

上代码://// Created by DevilInChina on 2018/6/21.//#ifndef HEAP_HEAP_CPP#define HEAP_HEAP_CPP#include <vector>#include <cstring>#include <functional>#include <algorithm>#defi...

2018-07-27 00:43:00 50

转载 基础算法:排序算法

话不多说,上代码#include <stdio.h>#include <stdlib.h>#include <time.h>#include <random>#include <string.h>#define N 10000500long long beg;int cnt,n;vo...

2018-07-27 00:35:00 66

转载 HDU 4267 A Simple Problem with Integers

A Simple Problem with IntegersTime Limit: 5000/1500 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6329Accepted Submission(s): 2041Problem Description...

2018-07-27 00:24:00 67

转载 POJ 1860 Currency Exchange

Currency ExchangeTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 35676Accepted: 13672DescriptionSeveral currency exchange points are working in our ...

2018-07-26 17:50:00 42

转载 HDU 6311 Cover

CoverTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 440Accepted Submission(s): 65Special JudgeProblem DescriptionThe Wall has do...

2018-07-26 10:27:00 61

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除