解题报告
文章平均质量分 82
安静de想着网名
300字以内
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Origami【栈】
字节跳动冬令营网络赛Chiaki has a very big sheet of paper. This sheet has a form of rectangle with dimensions 1 x n and numbers from 1 to n was written on each small 1 x 1 grid. Chiaki would like to fold the pa...原创 2018-12-01 18:28:58 · 344 阅读 · 0 评论 -
BZOJ3384 模板题【树链剖分】
已知一棵包含N个结点的树(连通且无环),每个节点上包含一个数值,需要支持以下操作:操作1: 格式: 1 x y z 表示将树从x到y结点最短路径上所有节点的值都加上z操作2: 格式: 2 x y 表示求树从x到y结点最短路径上所有节点的值之和操作3: 格式: 3 x z 表示将以x为根节点的子树内所有节点值都加上z操作4: 格式: 4 x 表示求以x为根节点的子树内所有节点值之和原创 2018-04-25 19:05:09 · 244 阅读 · 0 评论 -
[USACO18JAN]Rental Service 【策略】
DescriptionFarmer John realizes that the income he receives from milk production is insufficient to fund the growth of his farm, so to earn some extra money, he launches a cow-rental service, which ...原创 2018-04-21 18:37:05 · 663 阅读 · 0 评论 -
[USACO18JAN]MooTube【并查集】
Farmer John原创 2018-04-21 17:35:30 · 2592 阅读 · 0 评论 -
Cover Point (DP)
CoverTime Limit: 1000MS Memory Limit: 65536K You are given N points in the coordinate system. They need to be covered with one or more rectangles, such that the following conditions are met:...原创 2018-03-21 16:03:02 · 307 阅读 · 0 评论 -
线段树(动态建点)
敌兵布阵原创 2018-03-05 18:24:08 · 459 阅读 · 0 评论 -
二维线段树之降维打击
COCI 2017/2018 ROUND#1DedaLittle Marica is making up a nonsensical unusual fairy tale and is telling to her grandfatherwho keeps interrupting her and asking her stupid intriguing questions.In Mar...原创 2018-03-12 12:21:19 · 513 阅读 · 0 评论 -
Yet Another Tree Query Problem(二维线段树)
Yet Another Tree Query Problem原创 2018-03-11 11:54:20 · 448 阅读 · 0 评论 -
小小粉丝度度熊【尺取】
小小粉丝度度熊原创 2018-02-03 13:06:01 · 205 阅读 · 0 评论 -
Chess
Chess原创 2018-02-03 13:05:14 · 181 阅读 · 0 评论 -
度度熊的01世界
度度熊的01世界原创 2018-02-03 13:04:20 · 331 阅读 · 0 评论 -
小C的倍数问题
小C的倍数问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description根据小学数学的知识,我们知道一个正整数x是3的倍数的条件是x每一位加起来的和是3的倍数。反之,如果一个数每一位加起来是3的倍数,则这个数肯定是3的倍数。现在给定进制P原创 2017-08-14 19:04:56 · 238 阅读 · 0 评论 -
gym/101810-N-Dimensional Grid【找规律】
N-Dimensional GridYou are given an n-dimensional grid in which the dimensions of the grid are a1 × a2 × … × an. Each cell in the grid is represented as an n-tuple (x1, x2, …, xn) (1 ≤ xi ≤ ai).Two...原创 2018-07-17 22:37:07 · 641 阅读 · 0 评论 -
GYM-101808-C-Help Shahhoud
C. Help ShahhoudShahhoud is participating in the first Div.3 contest on Codeforces, the first problem was:Given two strings A and B of equal length N (N is odd), find the minimum number of steps n...原创 2018-07-18 12:48:51 · 474 阅读 · 0 评论 -
Call of Accepted【中缀表达式】2018ICPC沈阳网络赛
Call of AcceptedYou and your friends are at the table, playing an old and interesting game - the Call of Cthulhu. There is a mechanism in the game: rolling the dice. You use a notation to communica...原创 2018-09-08 18:52:10 · 394 阅读 · 0 评论 -
HDU6354-Everything has changed【计算几何】
Edward is a worker for Aluminum Cyclic Machinery. His work is operating mechanical arms to cut out designed models. Here is a brief introduction of his work. Assume the operating plane as a two-dimen...原创 2018-08-06 23:42:54 · 327 阅读 · 0 评论 -
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 forgot to...原创 2018-07-27 17:00:18 · 230 阅读 · 0 评论 -
POJ 2195【KM 二分图带权最大匹配】
DescriptionOn a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, to an adjacent point. For each little ma...原创 2018-07-27 16:50:51 · 232 阅读 · 0 评论 -
POJ2771【二分图-最大独立集】
DescriptionFrank N. Stein is a very conservative high-school teacher. He wants to take some of his students on an excursion, but he is afraid that some of them might become couples. While you can ne...原创 2018-07-27 15:10:23 · 662 阅读 · 0 评论 -
POJ1422 空降兵【二分图-最小路径覆盖】
DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and walking through town’s st...原创 2018-07-27 14:25:14 · 317 阅读 · 0 评论 -
Robots at Warehouse【dfs/bfs】
J. Robots at WarehouseVitaly works at the warehouse. The warehouse can be represented as a grid of n × m cells, each of which either is free or is occupied by a container. From every free cell it’s ...原创 2018-07-22 15:05:27 · 277 阅读 · 0 评论 -
gym/226036-F. Two Points【三分查找】
F. Two PointsThere are two points (x1, y1) and (x2, y2) on the plane. They move with the velocities (vx1, vy1) and (vx2, vy2). Find the minimal distance between them ever in future.InputThe firs...原创 2018-07-21 22:10:09 · 435 阅读 · 0 评论 -
Gym - 100971D==Laying Cables【单调栈】
One-dimensional country has n cities, the i-th of which is located at the point xi and has population pi, and all xi, as well as all pi, are distinct. When one-dimensional country got the Internet, it...原创 2018-07-21 21:53:27 · 418 阅读 · 0 评论 -
gym/100482/problem/G Pairs【逆元】
G. PairsThe pair in the land of 1000000007 is the pair of numbers a and b with the following relation: a × b = 1 (mod 1000000007). It is believed to be the sign of divine. Your task is to increase t...原创 2018-07-28 18:40:39 · 287 阅读 · 0 评论 -
HDU3577【线段树+区间更新+最值查询】
Fast ArrangementProblem DescriptionChinese always have the railway tickets problem because of its’ huge amount of passangers and stations. Now goverment need you to develop a new tickets query s...原创 2018-07-18 20:39:51 · 727 阅读 · 0 评论 -
Winning Cells
GYM-101608-M原创 2018-02-03 12:58:02 · 316 阅读 · 0 评论 -
机器人指令缩减【模拟】
CF-GYM-101608-E原创 2018-02-03 12:38:23 · 311 阅读 · 0 评论 -
二分图最大匹配
POJ 3041原创 2017-08-11 18:13:47 · 254 阅读 · 0 评论 -
acm 模板
卢卡斯定理 主席树 Sunday AC自动机 链式前向星#include<string.h>#define MAX 10000struct node{ int to,nex,wei;}edge[MAX*2+5];int head[MAX+5],cnt;void add(int u,int v,int w)//添加一个单向边u->v 权为w {...原创 2017-08-11 17:47:51 · 363 阅读 · 0 评论 -
POJ 3071 Football
DescriptionConsider a single-elimination football tournament involving 2n teams, denoted 1, 2, …, 2n. In each round of the tournament, all teams still in the tournament are placed in a list in order原创 2017-08-10 19:44:26 · 228 阅读 · 0 评论 -
HDU 1520 Anniversary party
Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means that the supervisor原创 2017-08-10 19:44:23 · 232 阅读 · 0 评论 -
度度熊与邪恶大魔王 DP | 完全背包
Problem Description度度熊为了拯救可爱的公主,于是与邪恶大魔王战斗起来。邪恶大魔王的麾下有n个怪兽,每个怪兽有a[i]的生命值,以及b[i]的防御力。度度熊一共拥有m种攻击方式,第i种攻击方式,需要消耗k[i]的晶石,造成p[i]点伤害。当然,如果度度熊使用第i个技能打在第j个怪兽上面的话,会使得第j个怪兽的生命值减少p[i]-b[j],当然如果伤害小于防御,那么攻击就原创 2017-08-10 19:44:18 · 278 阅读 · 0 评论 -
超超超简单的bfs——POJ-1915
Knight MovesTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 26102 Accepted: 12305DescriptionBackground Mr Somurolov, fabulous chess-gamer indeed, asserts that no one else原创 2017-08-10 19:43:45 · 275 阅读 · 0 评论 -
超超超简单的bfs——POJ-3278
Catch That CowTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 89836 Accepted: 28175DescriptionFarmer John has been informed of the location of a fugitive cow and wants to原创 2017-08-10 19:43:40 · 317 阅读 · 0 评论 -
宽度优先搜索
Breadth First Search宽度优先搜索算法(又称广度优先搜索)是最简便的图的搜索算法之一,这一算法也是很多重要的图的算法的原型。Dijkstra单源最短路径算法和Prim最小生成树算法都采用了和宽度优先搜索类似的思想。其别名又叫BFS,属于一种盲目搜寻法,目的是系统地展开并检查图中的所有节点,以找寻结果。换句话说,它并不考虑结果的可能位置,彻底地搜索整张图,直到找到结果为止。原创 2017-08-10 19:43:42 · 475 阅读 · 0 评论 -
java大数
Avaricious Maryanna UVA-12009After Maryanna found the treasure buried by 27 pilots in a secret cave, she wanted to leave there immediately. Unfortunately, nding the door closed because of the overwe原创 2017-10-07 21:15:12 · 281 阅读 · 0 评论 -
STL例题
丑数 UVA-136Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, … shows the first 11 ugly numbers. By convention, 1 is included. Write a原创 2017-08-26 18:54:39 · 431 阅读 · 0 评论 -
About 日历
判断闰年,判断星期几原创 2017-08-12 14:54:25 · 560 阅读 · 0 评论 -
STL——set
set原创 2017-08-13 12:44:40 · 219 阅读 · 0 评论 -
页面置换算法
CF-GYM-101498-F原创 2018-02-03 12:37:05 · 331 阅读 · 0 评论
分享