自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

LP_Cong

你的努力程度还没到拼天赋的程度。

  • 博客(32)
  • 资源 (1)
  • 收藏
  • 关注

原创 CodeForces - 939E Maximize! (三分搜索)

Maximize!time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a multiset S consisting of positive integers (initially empty). There are t...

2018-03-30 16:19:28 259

原创 CodeForces - 939D Love Rescue (最小生成树)

Love Rescuetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputValya and Tolya are an ideal pair, but they quarrel sometimes. Recently, Valya took off...

2018-03-30 15:06:17 271

原创 CodeForces - 937D Sleepy Game (乘法逆元)

Fafa and Ancient Alphabettime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAncient Egyptians are known to have used a large set of symbols  to write...

2018-03-29 15:24:26 280

原创 CodeForces - 937D Sleepy Game (深搜判环)

Sleepy Gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya and Vasya arranged a game. The game runs by the following rules. Players have a d...

2018-03-28 22:36:10 394

原创 CodeForces - 946D Timetable(分组背包)

Timetabletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIvan is a student at Berland State University (BSU). There are n days in Berland week, an...

2018-03-28 15:41:32 302

原创 CodeForces - 954G Castle Defense (二分+尺取法思想)

Castle Defensetime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputToday you are going to lead a group of elven archers to defend the castle that is ...

2018-03-27 21:49:23 669

原创 CodeForces - 931E Game with String (思维)

Game with Stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya and Kolya play a game with a string, using the following rules. Initially, K...

2018-03-27 18:29:11 680

原创 CodeForces - 924C Riverside Curio (思维)

Riverside Curiotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputArkady decides to observe a river for n consecutive days. The river's water level on...

2018-03-26 19:33:42 613

原创 CodeForces - 924B Three-level Laser (二分搜索)

Three-level Lasertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAn atom of element X can exist in n distinct states with energies E1 < E2 < ...

2018-03-26 18:26:04 476

原创 1/x+1/y=1/n 正整数解的个数(约数定理)

对于一个大于1正整数n可以分解质因数:n = p1^a1*p2^a2*......pk^ak,则n的正约数的个数就是  :(a1+1)*(a2+1)*......*(ak+1)其中a1、a2、a3…ak是p1、p2、p3,…pk的指数。#include<iostream>using namespace std;typedef long long int ll;int main()...

2018-03-24 20:18:27 6800

原创 C++ 手动实现虚函数功能

用C/C++自己实现了类似虚函数的功能。核心就是虚函数表和虚函数表指针。简单易懂~!#include<iostream>using namespace std;//虚函数表类struct VTable{ void (*func1)(); void (*func2)();};//基类class A{public: VTable* vt_ptr;/...

2018-03-23 11:57:41 408

原创 Gym - 101498D Counting Paths (推公式)

Counting Pathstime limit per test1.0 smemory limit per test256 MBinputstandard inputoutputstandard outputA binary tree is a tree data structure in which each node has at most two children, which are r...

2018-03-23 10:55:39 420

原创 计算机网络基础 学习笔记

OSI七层协议:应用层,表示层,会话层,运输层,网络层,数据链路层,物理层。TCP/IP四层协议:应用层,运输层,网际层,网络接口层。物理层:将数字信号转换为模拟信号,反之也可。其中涉及到编码与调制。其中传输方式有,并行传输,串行传输,异步传输和同步传输。传输的媒介有双绞线,同轴电缆和光纤。信道复用技术:复用就是通过一条物理线路,同时传输多路用户的信号。其中包括,频分复用,时分复用,波分复用和码分...

2018-03-17 16:22:36 2172

转载 质数测试(Miller-Rabin详解)

        一个数是素数(也叫质数),当且仅当它的约数只有两个——1和它本身。规定这两个约数不能相同,因此1不是素数。对素数的研究属于数论范畴,你可以 看到许多数学家没事就想出一些符合某种性质的素数并称它为某某某素数。整个数论几乎就围绕着整除和素数之类的词转过去转过来。对于写代码的人来说,素数比 想像中的更重要,Google一下BigPrime或者big_prime你总会发现大堆大堆用到了素数...

2018-03-16 15:19:17 2456

原创 UVA - 10480 Sabotage (最大流最小割定理)

题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1421裸的最小割,学习了一下最小割,很容易明白最小割就是最大流。但是这题要输出路径,通过寻找最大流可以把点分为两类,即割后的点集,一个属于S,一个属于T,然后就可以输出割边...

2018-03-15 16:57:34 381

原创 HDU - 4280 Island Transport (最大流 邻接表)

Island TransportTime Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 10558    Accepted Submission(s): 3393Problem Description  In the vast waters f...

2018-03-15 13:33:50 296

原创 POJ - 1459 Power Network (最大流模板)

Power NetworkTime Limit: 2000MS Memory Limit: 32768KTotal Submissions: 29759 Accepted: 15413DescriptionA power network consists of nodes (power stations, consumers and dispatchers) connected by power ...

2018-03-14 22:34:42 191

原创 POJ - 2516 Minimum Cost (最小费用最大流)

Minimum CostTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 17879 Accepted: 6289DescriptionDearboy, a goods victualer, now comes to a big problem, and he needs your help. In his sale area th...

2018-03-14 21:00:41 233

原创 HDU - 3333 Turing Tree (线段树+离线查询)

Turing TreeTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6122    Accepted Submission(s): 2189Problem DescriptionAfter inventing Turing Tree, 3...

2018-03-08 14:21:52 267

原创 POJ - 2195 Going Home (最小费用最大流)

Going HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 24299 Accepted: 12196DescriptionOn a grid map there are n little men and n houses. In each unit time, every little man can move one ...

2018-03-07 22:17:37 264

原创 POJ - 3436 ACM Computer Factory (最大流问题 + 拆点)

ACM Computer FactoryTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8767 Accepted: 3197 Special JudgeDescriptionAs you know, all the computers used for ACM contests must be identical, so the...

2018-03-07 19:10:09 286

原创 HDU - 1151 Air Raid (最小路径覆盖)

Air RaidTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5826    Accepted Submission(s): 3919Problem DescriptionConsider a town where all the str...

2018-03-07 14:11:57 451

原创 HDU - 2389 Rain on your Parade(Hopcroft Karp算法)

Rain on your ParadeTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 655350/165535 K (Java/Others)Total Submission(s): 5004    Accepted Submission(s): 1654Problem DescriptionYou’re giving a part...

2018-03-06 23:07:50 203

原创 HDU - 2819 Swap (二分匹配+输出路径)

SwapTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4278    Accepted Submission(s): 1581Special JudgeProblem Description Given an N*N matrix wit...

2018-03-05 21:01:38 253

原创 HDU - 1045 Fire Net (二分匹配)

Fire NetTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13509    Accepted Submission(s): 8225Problem DescriptionSuppose that we have a square ci...

2018-03-05 13:43:03 221

原创 CodeForces - 931B World Cup(模拟)

World Cuptime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe last stage of Football World Cup is played using the play-off system.There are n teams...

2018-03-05 11:43:24 759

原创 CodeForces - 931D Peculiar apple-tree(深搜)

Peculiar apple-treetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn Arcady's garden there grows a peculiar apple-tree that fruits one time per ye...

2018-03-05 11:39:32 825

原创 HDU - 4612 Warm up (树的直径)

Warm upTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 7778    Accepted Submission(s): 1785Problem Description   N planets are connected by M b...

2018-03-03 15:27:50 243

原创 POJ - 3177 Redundant Paths (双连通分量+缩点)

Redundant PathsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 17110 Accepted: 7117DescriptionIn order to get from one of the F (1 <= F <= 5,000) grazing fields (which are numbered 1.....

2018-03-03 14:25:41 338

原创 POJ - 3694 Network (无向图 并查集缩点+割边)

NetworkTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 10981 Accepted: 4103DescriptionA network administrator manages a large network. The network consists of N computers and M links between...

2018-03-02 17:59:30 1353 1

原创 UVA - 796 Critical Links (无向图求割边(桥))

题目地址:https://odzkskevi.qnssl.com/3cd04903de1a1bf3c4d522fe768eabe5?v=1519718357题意:求割边的数量解题思路:割边就是删掉该边后,该无向图不再联通。在求割点的做法上,稍微改改就可以了。#include <iostream>#include <vector>#include <memory.h...

2018-03-02 16:08:24 359

原创 UVA - 315 Network (无向图求割点)

题目链接:https://odzkskevi.qnssl.com/1d216d365044eafd32f94ce5b5f6912c?v=1519863447题意:求割点解题思路:割点是无向图中的一个概念,一个点,去掉之后,无向图不再联通,那么该点就是割点。#include <iostream>#include <vector>#include <memory.h&...

2018-03-02 15:29:52 318

C语言教程讲义(谭浩强).pdf

基础教程!你懂的!214页!

2012-05-07

空空如也

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

TA关注的人

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