- 博客(20)
- 收藏
- 关注
原创 hdu 6181 Two Paths(最短路,spfa)
题目链接:传送门Two PathsTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 153428/153428 K (Java/Others) Total Submission(s): 971 Accepted Submission(s): 450Problem Description You are given a undir
2017-08-28 20:10:52 255
转载 全网最!详!细!tarjan算法讲解。
转载博客链接:传送门全网最详细tarjan算法讲解,我不敢说别的。反正其他tarjan算法讲解,我看了半天才看懂。我写的这个,读完一遍,发现原来tarjan这么简单!tarjan算法,一个关于 图的联通性的神奇算法。基于DFS(迪法师)算法,深度优先搜索一张有向图。!注意!是有向图。根据树,堆栈,打标记等种种神(che)奇(dan)方法来完成剖析一个图的工作。而图的联通性,就是任督二脉通不
2017-08-23 18:11:04 354
原创 hdu 6165 FFF at Valentine (Tarjan算法,scc+dp)
题目链接:传送门第一次遇到Tarjan算法的题。 Tarjan算法讲解:传送门 引用的链接:传送门【强连通分量】有向图中, u可达v不一定意味着v可达u. 相互可达则属于同一个强连通分量(Strongly Connected Component, SCC)有向图和它的转置的强连通分量相同 所有SCC构成一个DAG 1、强连通图。在一个强连通图中,任意两个点都通过一定路径互相连通。比如图一是一
2017-08-23 17:48:52 373
原创 hdu 6154 CaoHaha's staff(找规律)
题目链接:传送门CaoHaha’s staffTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 0 Accepted Submission(s): 0Problem Description “You shall not pass!”
2017-08-19 17:44:42 400
原创 zoj-3687-The Review Plan I(禁位排序)
题目链接:传送门The Review Plan I Time Limit: 5 Seconds Memory Limit: 65536 KB Michael takes the Discrete Mathematics course in this semester. Now it’s close to the final exam, and he wants to take a co
2017-08-18 17:43:07 324
原创 zoj 2836 Number Puzzle(容斥原理)
题目链接:传送门Number Puzzle Time Limit: 2 Seconds Memory Limit: 65536 KB Given a list of integers (A1, A2, …, An), and a positive integer M, please find the number of positive integers that are not gr
2017-08-18 10:05:00 297
原创 hdu 6092 Rikka with Subset(多重背包)
题目链接:这里写链接内容Rikka with SubsetTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1647 Accepted Submission(s): 822Problem Description As we know
2017-08-17 18:12:09 229
原创 hdu 6045 Is Derek lying?
题目链接:传送门Is Derek lying?Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1606 Accepted Submission(s): 830Problem Description Derek and Alfia
2017-08-17 08:46:43 260
原创 hdu 6034 Balala Power!
题目链接:传送门Balala Power! Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 5833 Accepted Submission(s): 1475Problem DescriptionTalented Mr.T
2017-08-16 18:37:54 218
原创 hdu 6033 Add More Zero
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6033这一题题目很简单,但是当时就是想了很久,没有想到。求n个数相(a1–an)乘后,所得数的位数:log10(ai)的和就为长度。以前做过 数的长度这道题,但是当时没有想太多,这回是,知道了。#include<stdio.h>#include<math.h>int main(){ int
2017-08-16 08:56:25 259
原创 楼房重建 (线段树)
题目链接:传送门 2957: 楼房重建Time Limit: 10 Sec Memory Limit: 256 MB Submit: 2289 Solved: 1081 [Submit][Status][Discuss] Description 小A的楼房外有一大片施工工地,工地上有N栋待建的楼房。每天,这片工地上的房子拆了又建、建了又拆。他经常无聊地看着窗外发呆,数自己能够看到多少栋
2017-08-12 18:44:40 565
原创 hdu 3265 Posters (线段树,离散化+扫描线)
题目链接:传送门PostersTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6379 Accepted Submission(s): 1537Problem DescriptionTed has a new house with
2017-08-11 17:29:26 248
原创 hdu 1255 覆盖的面积 (线段树,离散化+扫描线)
题目链接:传送门覆盖的面积Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6058 Accepted Submission(s): 3051Problem Description 给定平面上若干矩形,求出被这些矩形覆盖过至少两次
2017-08-11 10:31:58 243
原创 hdu 1542 Atlantis (线段树,离散化+扫描线)
Atlantis 题目链接:传送门AtlantisTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13741 Accepted Submission(s): 5704Problem DescriptionThere are se
2017-08-09 17:35:16 335
原创 POJ 2528 Mayor's posters (线段树+离散化)
Mayor’s posters 题目链接:传送门DescriptionThe citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their
2017-08-09 08:49:41 285
原创 Can you answer these queries?(线段树,区间更新,更新到点)
题目 链接:传送门A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. Each of the battleships can be marked a valu
2017-08-05 16:59:30 220
原创 Count the Colors (线段树,区间更新)
Count the Colors 链接:传送门Painting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones. Your task is counting the segments of different colors you
2017-08-04 21:51:58 181
原创 A Simple Problem with Integers (线段树,区间求和+区间更新)
A Simple Problem with Integers 链接:传送门You have NN integers, A1,A2,⋯,ANA1,A2,⋯,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a giv
2017-08-04 21:22:14 243
原创 B - I Hate It (线段树,点的更新+区间最大值)
B - I Hate It 链接:传送门很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0
2017-08-04 21:01:27 187
原创 F - 游戏人生(区间dp)
游戏人生时间限制: 1000ms内存限制: 128000KB 64位整型: Java 类名:上一题 提交 运行结果 统计 讨论版 下一题题目描述一入宿舍深似海,自此AC是路人,善哉善哉。。。有这样一个游戏:有一排妖怪,每个妖怪都有一个主要攻击值和辅助攻击值,你每次只能攻击一个妖怪,当你攻击一个妖怪时,这只妖怪 很显然的就挂了(要不都没得玩儿了),当然当前妖怪对你造成的伤
2017-08-03 08:40:38 269
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人