- 博客(66)
- 收藏
- 关注
原创 Power OJ 2543 赛场布置(网络流最小割)
题目链接:https://www.oj.swust.edu.cn/problem/show/2543赛场布置Time Limit:5000MS Memory Limit:131072KBDescription 上决╇ф成功地阻止了大魔王的复活,于是西南科技大学信息工程学院又举行了一年一度的院赛。为了让比赛能够顺利进行,上决╇ф让FM负责布置比赛的其中一个赛场,
2016-12-26 20:53:03 657
原创 无向图的割点,割边,点双连通,边双连通模板
#includeusing namespace std;const int maxn = 100010;const int maxm = 500010;int num, p[maxn];struct EDGE{ int u, v, next; bool cut; EDGE() {} EDGE(int u, int v, int next, bool cu
2016-10-08 14:12:58 399
原创 hiho 1383 The Book List
The Book List时间限制:1000ms单点时限:1000ms内存限制:256MB描述The history of Peking University Library is as long as the history of Peking University. It was build in 1898. At the end of year 2015,
2016-09-25 09:48:56 624
原创 hdu 5900 QSC and Master (区间dp)
QSC and MasterTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1086 Accepted Submission(s): 429Problem DescriptionEvery school h
2016-09-23 19:15:41 577
原创 hdu 5898 odd-even number (数位dp)
odd-even numberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 648 Accepted Submission(s): 357Problem DescriptionFor a number
2016-09-23 18:39:07 413
原创 题解
A:由于保证了边界情况,所以直接对于每个字符暴力找即可。#includeusing namespace std;char s[110];char a[50]={"qwertyuiopasdfghjkl;zxcvbnm,./"};int main(){ char c[10]; while(scanf("%s",c)==1) { scanf("
2016-09-11 20:55:20 308
原创 hdu 5853 Jong Hyok and String (二分+后缀数组+RMQ)
Jong Hyok and StringTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 301 Accepted Submission(s): 66Problem DescriptionJong Hyok
2016-08-18 10:25:55 479
原创 POJ1741 Tree (树形dp+点分治)
DescriptionGive a tree with n vertices,each edge has a length(positive integer less than 1001).Define dist(u,v)=The min distance between node u and v. Give an integer k,for every pair (u,v)
2016-08-17 14:57:56 1601 1
原创 CF 219D Choosing Capital for Treeland (树形dp)
D. Choosing Capital for Treelandtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe country Treeland consists of n cities, some
2016-08-16 10:41:18 387
原创 hdu 5834 Magic boy Bi Luo with his excited tree (树形dp)
Magic boy Bi Luo with his excited treeTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 511 Accepted Submission(s): 108Problem Description Bi
2016-08-15 16:10:41 363
原创 hdu 4966 GGS-DDU (最小树形图)
DescriptionDo you think this is a strange problem name? That is because you don't know its full name---'Good Good Study and Day Day Up!". Very famous sentence! Isn't it?Now "GGS-DDU" is lzqx
2016-08-10 20:38:24 367
原创 2038: [2009国家集训队]小Z的袜子(hose) (莫队算法)
2038: [2009国家集训队]小Z的袜子(hose)Time Limit: 20 Sec Memory Limit: 259 MBSubmit: 6944 Solved: 3191[Submit][Status][Discuss]Description作为一个生活散漫的人,小Z每天早上都要耗费很久从一堆五颜六色的袜子中找出一双来穿。终于有一天,小Z再也无法忍受这恼人
2016-08-08 15:22:25 324
原创 CF 671E XOR and Favorite Number (莫队算法)
E. XOR and Favorite Numbertime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob has a favorite number k andai of len
2016-08-08 13:31:53 267
原创 CodeForces 703D Mishka and Interesting sum
D. Mishka and Interesting sumtime limit per test3.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Mishka enjoys programming. Sin
2016-08-08 10:46:25 524
原创 hdu 5727 Necklace (全排列+二分匹配)
Problem DescriptionSJX has 2*N magic gems. N of them have Yin energy inside while others have Yang energy. SJX wants to make a necklace with these magic gems for his beloved BHB. To avoid making
2016-07-21 10:39:47 320
原创 无向图的桥、割点、边双连通
#include#include#include#include#include#define LL long longusing namespace std;const int maxn=100010;const int maxm=500010;struct node{ int v,next; bool cut;}E[maxm];int n,m;int
2016-07-17 17:00:20 346
原创 FZU 2180 骑士 (双向BFS)
Description在一个5×5的棋盘上有12个白色的骑士和12个黑色的骑士, 且有一个空位。在任何时候一个骑士都能按照骑士的走法(它可以走到和它横坐标相差为1,纵坐标相差为2或者横坐标相差为2,纵坐标相差为1的格子)移动到空位上。给定一个初始的棋盘,怎样才能经过移动变成如下目标棋盘: 为了体现出骑士精神,他们必须以最少的步数完成任务。Input第一行
2016-07-04 15:59:31 954 1
原创 hdu 2579 Dating with girls(2) (BFS)
Problem DescriptionIf you have solved the problem Dating with girls(1).I think you can solve this problem too.This problem is also about dating with girls. Now you are in a maze and the girl you wan
2016-07-04 13:22:13 565
原创 hdu 1072 Nightmare (BFS)
Problem DescriptionIgnatius had a nightmare last night. He found himself in a labyrinth with a time bomb on him. The labyrinth has an exit, Ignatius should get out of the labyrinth before the bomb e
2016-07-04 13:10:45 290
原创 FZU 2124 吃豆人(BFS)
Description吃豆人是一款非常经典的游戏,游戏中玩家控制吃豆人在地图上吃光所有豆子,并且避免被怪物抓住。这道题没有怪物,将游戏的画面分成n*m的格子,每格地形可能为空地或者障碍物,吃豆人可以在空地上移动,吃豆人每移动一格需要1s时间,并且只能朝上下左右四个方向移动,特别的是吃豆人还能吐出舌头,舌头每移动一格需要0.1s时间,舌头只可以走直线。不必考虑吃豆人转身所需要的时间。
2016-07-04 12:20:25 1082
原创 POJ 1475 Pushing Boxes(BFS)
DescriptionImagine you are standing inside a two-dimensional maze composed of square cells which may or may not be filled with rock. You can move north, south, east or west one cell at a step. The
2016-07-04 12:10:21 2258
原创 有向图强连通分量Tarjan模板
#include#include#includeusing namespace std;const int maxn=10010;const int maxm=1000010;int cnt,p[maxn];struct node{ int v,next;}E[maxm];int n,m;int low[maxn],dfn[maxn];int Stack[maxn]
2016-04-06 17:30:58 301
原创 hdu 5619 Jam's store (费用流)
问题描述Jam不好好学习,然后就去帮别人修电脑了,在一家店里,有M个店员,现在有N个顾客,给出每个顾客对应给每个店员的修电脑的时间为Tij,问所有顾客要等待的最少时间。当然,一个顾客在某个店员那里完成之后,那个店员才会执行下一个顾客的任务输入描述第一行T(1≤T≤100),表示T组数据。接下来T组数据:每组数据第一行为M,N(1≤M,N≤20)表示店员数和顾客数接下来NNN行MM
2016-01-31 11:08:47 783
原创 线性规划与网络流24题 太空飞行计划问题 (最小割及输出方案)
太空飞行计划问题时间限制:1 Sec 内存限制:64 MB Special Judge提交: 15 解决:7[提交][状态][讨论版] [Edit] [TestData]题目描述W 教授正在为国家航天中心计划一系列的太空飞行。每次太空飞行可进行一系列商业性实验而获取利润。现已确定了一个可供选择的实验集合E={E1,E2,…,Em},和进行这些实验需要使用的
2016-01-29 12:34:20 706
原创 Educational Codeforces Round 5 (D. Longest k-Good Segment)
D. Longest k-Good Segmenttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe array a withn integers is given. Let's
2016-01-28 15:22:04 492
原创 Codeforces Round #339 (Div. 2) D. Skills
D. Skillstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLesha plays the recently published new version of the legendary game ha
2016-01-28 13:02:27 772
原创 CodeForces - 620E New Year Tree (线段树+dfs序)
E. New Year Treetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe New Year holidays are over, but Resha doesn't want to throw
2016-01-27 18:05:58 1096 1
原创 HDU 3667 Transportation (最小费用最大流)
DescriptionThere are N cities, and M directed roads connecting them. Now you want to transport K units of goods from city 1 to city N. There are many robbers on the road, so you must be very caref
2016-01-23 18:10:37 512
原创 POJ 3422 Kaka's Matrix Travels (最大费用最大流)
DescriptionOn an N ×N chessboard with a non-negative number in each grid, Kaka starts his matrix travels withSUM = 0. For each travel, Kaka moves one rook from the left-upper grid to the rig
2016-01-23 14:25:05 283
原创 POJ 3680 Intervals (费用流经典构图题)
DescriptionYou are given N weighted open intervals. Theith interval covers (ai,bi) and weighswi. Your task is to pick some of the intervals to maximize the total weights under the limit th
2016-01-23 12:50:37 930
原创 POJ 2699 The Maximum Number of Strong Kings (网络流)
DescriptionA tournament can be represented by a complete graph in which each vertex denotes a player and a directed edge is from vertex x to vertex y if player x beats player y. For a player x in
2016-01-22 19:04:41 389
原创 SPOJ 962 Intergalactic Map (网络流)
Description Jedi knights, Qui-Gon Jinn and his young apprentice Obi-Wan Kenobi, are entrusted by Queen Padmé Amidala to saveNaboo from an invasion by the Trade Federation. They must leave Naboo
2016-01-22 18:35:37 540
原创 SPOJ 287 Smart Network Administrator (网络流)
DescriptionThe citizens of a small village are tired of being the only inhabitants around without a connection to the Internet. After nominating the future network administrator, his house was c
2016-01-22 18:18:18 683
原创 SGU 326 Perspective (网络流)
DescriptionBreaking news! A Russian billionaire has bought a yet undisclosed NBA team. He's planning to invest huge effort and money into making that team the best. And in fact he's been very sp
2016-01-22 16:10:54 464
原创 ZOJ 2760 How Many Shortest Path (最小费用最大流做法)
DescriptionGiven a weighted directed graph, we define the shortest path as the path who has the smallest length among all the path connecting the source vertex to the target vertex. And if two pat
2016-01-22 15:32:02 375
原创 POJ 3281 Dining (网络流)
DescriptionCows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others.Farmer John has cooked fabulous meals for his cows, but he forgo
2016-01-22 15:10:33 242
原创 POJ 2391 Ombrophobic Bovines (网络流)
DescriptionFJ's cows really hate getting wet so much that the mere thought of getting caught in the rain makes them shake in their hooves. They have decided to put a rain siren on the farm to let
2016-01-22 14:58:53 297
原创 POJ 1637 Sightseeing tour (网络流解决混合图欧拉回路问题)
DescriptionThe city executive board in Lund wants to construct a sightseeing tour by bus in Lund, so that tourists can see every corner of the beautiful city. They want to construct the tour so th
2016-01-22 14:35:54 332
原创 poj 1734 Sightseeing trip (floyd求最小环并记录路径)
点击打开题目链接DescriptionThere is a travel agency in Adelton town on Zanzibar island. It has decided to offer its clients, besides many other attractions, sightseeing the town. To earn as much as poss
2015-11-23 13:37:42 426
原创 SWUST ACM 训练题部分题解 hdu1384 && hdu3666 && hdu 4786 &&uva 1395 && uva 1151
训练题网址:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=99765#problem/AB - Intervals (hdu1384)题意:给你n个区间每个区间的范围为[l,r],让你确定num个整数,使这num个整数在第i个区间[li,ri]至少有Ci个共同的数。题目先给你一个数n,接下来n行告诉你三个数li,ri,Ci,输出
2015-11-21 21:10:10 868
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人