ICPC2017网络赛(沈阳)1005&HDU6198 number (矩阵+快速幂)

number number number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 26 Accepted Submission(s): 13 Problem Description We define a sequence F: ⋅ F0=0,F1=1; ⋅ Fn=Fn−1+Fn−2 (n≥2). Give you an ...
阅读(1126) 评论(0)

ICPC2017网络赛(乌鲁木齐)E: Half-consecutive Numbers (大数)

E: Half-consecutive Numbers time limit 2000ms memory limit 131072KB The numbers 1, 3, 6, 10, 15, 21, 28, 36, 45 and t = i(i +1), are called halfconsecutive. For given N, find the smallest r which is no smaller than N such that t is square. i 2 1 r Inpu...
阅读(720) 评论(0)

ICPC2017网络赛(乌鲁木齐)H: Skiing (SPFA最长路)

H: Skiing time limit 1000ms memory limit 131072KB i i In this winter holiday, Bob has a plan for skiing at the mountain resort. This ski resort has M different ski paths and N different flags situated at those turning points. The i-th path from the S -th fla...
阅读(858) 评论(0)

bzoj 1024: [SCOI2009]生日快乐(暴力dfs枚举所有情况)

1024: [SCOI2009]生日快乐 Time Limit: 1 Sec Memory Limit: 162 MB Submit: 2890 Solved: 2103 [Submit][Status][Discuss] Description   windy的生日到了,为了庆祝生日,他的朋友们帮他买了一个边长分别为 X 和 Y 的矩形蛋糕。现在包括windy ,一共有 N 个人来分这块大蛋糕,要求每个人必须获得相同面积的蛋糕。windy主刀,每一切只能平行于一块蛋糕 的一边(任意一边),并且必须...
阅读(572) 评论(0)

bzoj1001 [BeiJing2006]狼抓兔子(网络流dinic算法||最短路spfa)

1001: [BeiJing2006]狼抓兔子 Time Limit: 15 Sec Memory Limit: 162 MB Submit: 24017 Solved: 6068 [Submit][Status][Discuss] Description 现在小朋友们最喜欢的"喜羊羊与灰太狼",话说灰太狼抓羊不到,但抓兔子还是比较在行的, 而且现在的兔子还比较笨,它们只有两个窝,现在你做为狼王,面对下面这样一个网格的地形: 左上角点为(1,1),右下角点为(N,M)(上图中N=4,M=5).有以下...
阅读(639) 评论(0)

bzoj 1007: [HNOI2008]水平可见直线(模拟栈)

1007: [HNOI2008]水平可见直线 Time Limit: 1 Sec Memory Limit: 162 MB Submit: 7644 Solved: 2922 [Submit][Status][Discuss] Description   在xoy直角坐标平面上有n条直线L1,L2,...Ln,若在y值为正无穷大处往下看,能见到Li的某个子线段,则称Li为 可见的,否则Li为被覆盖的. 例如,对于直线: L1:y=x; L2:y=-x; L3:y=0 则L1和L2是可见的,L3是被覆...
阅读(471) 评论(0)

51nod 1091 线段的重叠 (贪心)

1091 线段的重叠 基准时间限制:1 秒 空间限制:131072 KB 分值: 5 难度:1级算法题 X轴上有N条线段,每条线段包括1个起点和终点。线段的重叠是这样来算的,[10 20]和[12 25]的重叠部分为[12 20]。 给出N条线段的起点和终点,从中选出2条线段,这两条线段的重叠部分是最长的。输出这个最长的距离。如果没有重叠,输出0。 Input 第1行:线段的数量N(2 <= N <= 50000)。 第2 - N + 1行:每行2个数,线段的起点和终点。(0 <= s , e <= 10^...
阅读(504) 评论(0)

bzoj 1003 [ZJOI2006]物流运输(最短路spfa+dp)

1003: [ZJOI2006]物流运输 Time Limit: 10 Sec Memory Limit: 162 MB Submit: 8303 Solved: 3489 [Submit][Status][Discuss] Description   物流公司要把一批货物从码头A运到码头B。由于货物量比较大,需要n天才能运完。货物运输过程中一般要转 停好几个码头。物流公司通常会设计一条固定的运输路线,以便对整个运输过程实施严格的管理和跟踪。由于各种 因素的存在,有的时候某个码头会无法装卸货物。这时...
阅读(623) 评论(0)

RMRC2016问题 B: Election(概率计算)

问题 B: Election 时间限制: 1 Sec 内存限制: 128 MB 提交: 83 解决: 12 [提交][状态][讨论版] 题目描述 After all the fundraising, campaigning and debating, the election day has finally arrived. Only two candidates remain on the ballot and you work as an aide to one of them. Reports ...
阅读(813) 评论(0)

中石油4215: Water(dinic网络流,深度优化)

4215: Water 时间限制: 1 Sec 内存限制: 128 MB 提交: 49 解决: 12 [提交][状态][讨论版] 题目描述 A water company is trying to provide water from its pumping station to a mansion. The company owns n water stations, numbered 1..n, which are connected by a variety of pipes. Water ca...
阅读(575) 评论(0)

SER2016 DIV1 问题 H: Paint(区间问题贪心+dp优化)

问题 H: Paint 时间限制: 1 Sec 内存限制:128 MB 提交: 38 解决: 9 [提交][状态][讨论版] 题目描述 You are painting a picket fence with n slats, numbered from 1 to n. There are k painters willing to paint a specific portion of the fence. However, they don’t like each other, and each...
阅读(722) 评论(0)

(关系幂运算->n长度的最短路)河南省第十届ACM省赛题目:问题 I: Transmit information

问题 I: Transmit information 时间限制: 3 Sec 内存限制: 128 MB 提交: 2 解决: 2 [提交][状态][讨论版] 点击打开题目链接 题目描述 The Chinese people threw themselves into an all-out war of resistance against Japanese aggression in 1937. The first line of resistance against aggression was...
阅读(563) 评论(0)

HDU 4734 F(x) 数位dp

F(x) Time Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6341 Accepted Submission(s): 2438 Problem Description For a decimal number x with n digits (AnAn-1An-2 ... A2A1), we define its weight as F(x)...
阅读(421) 评论(0)

数位dp练习(记忆化搜索)HDU 2089 不要62

不要62 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 45764 Accepted Submission(s): 17240 Problem Description 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可...
阅读(532) 评论(0)

2017ICPC北方邀请赛H题 MJF wants to work(贪心)

4203: MJF wants to work 时间限制: 1 Sec 内存限制: 128 MB 提交: 60 解决: 11 [提交][状态][讨论版] 题目描述 MJF feel the summer vacation is very leisure. So he wants to work to earn money. There are n jobs MJF can take part in.For job i, it has the start time ti.x, the end time...
阅读(827) 评论(0)

2017广西邀请赛CS Course(&|^位运算模拟)

4334: CS Course 时间限制: 2 Sec 内存限制: 512 MB 提交: 37 解决: 13 [提交][状态][讨论版] 题目描述 Little A has come to college and majored in Computer and Science. Today he has learned bit-operations in Algorithm Lessons, and he got a problem as homework. Here is the problem: ...
阅读(1142) 评论(0)

HDU1532 Drainage Ditches 网络流之dinic算法(省内存,但耗时)

Drainage Ditches Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 19000 Accepted Submission(s): 9058 Problem Description Every time it rains on Farmer John's fields, a pond forms over Bessie's fa...
阅读(489) 评论(0)

Codeforces 785D - Anton and School - 2(范德蒙恒等式+逆元)

D. Anton and School - 2 time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output As you probably know, Anton goes to school. One of the school subjects that Anton studies is Bracketology. On the Bracketo...
阅读(604) 评论(0)

HDU1532 Drainage Ditches 网络流之SAP算法

HDU1532:http://acm.hdu.edu.cn/showproblem.php?pid=1532 Drainage Ditches Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 19000 Accepted Submission(s): 9058 Problem Description Every time it rain...
阅读(445) 评论(0)

poj3281 Dining 网络流匹配问题(拆点建图+Edmond-Karp算法)

Dining Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 19183 Accepted: 8556 Description Cows 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 mea...
阅读(842) 评论(0)
206条 共11页首页 上一页 1 2 3 4 5 ... 下一页 尾页
    • 访问:103698次
    • 积分:3019
    • 等级:
    • 排名:第13770名
    • 原创:197篇
    • 转载:9篇
    • 译文:0篇
    • 评论:33条