- 博客(9)
- 收藏
- 关注
原创 2021-08-02
2021牛客暑期多校训练营5J Jewels黄金水手在海底捞钻石,给的是一个三维的坐标,一颗钻石每秒向上飘vi米,求最小捞的时间。网络流的spfa版最大流,超时#include<stdio.h>#include<algorithm>#include<iostream>#include<cmath>#include<queue>#include<string>#include<string.h>#defi
2021-08-02 19:53:44
133
原创 Cleaning Shifts POJ - 2376
Cleaning Shifts POJ - 2376这题可以用线段树加dp#include<cstdio>#include<algorithm>#include<iostream>#include<string.h>using namespace std;int n,m,p,x,y,ans;int t;struct node{ int l,r,w;}tree[4000001];inline void build(int l,int r
2021-07-16 14:03:18
75
原创 Gym - 103117F
F - Direction SettingThe 2021 Sichuan Provincial Collegiate Programming Contest题意如下:多组输入,给你一个n,和一个m,下面一行n个数代表点的权值(ai),下面m条无向边ui,vi。现在给无向边标方向,0是前向后,1是后向前,(di,为第i个点的入度)求D的最小值网络流,最大流和费用流都可以,这里是最大流(因为费用流我没有写):给边上方向的时候可以理解为选其中一个点的入度加一,然后我们要尽可能的将每个值的度数值都不大于
2021-06-11 09:23:35
294
原创 Palindrome subsequence HDU - 4632
Palindrome subsequence HDU - 4632In mathematics, a subsequence is a sequence that can be derived from another sequence by deleting some elements without changing the order of the remaining elements. For example, the sequence <A, B, D> is a subsequen
2021-01-30 11:45:23
107
原创 Monkey Party HDU - 3506
Far away from our world, there is a banana forest. And many lovely monkeys live there. One day, SDH(Song Da Hou), who is the king of banana forest, decides to hold a big party to celebrate Crazy Bananas Day. But the little monkeys don’t know each other, so
2021-01-27 17:32:59
81
原创 poj 2259
当一个元素增加进来之后,唯一变化的应该是有某一行的长度变长了,那么应该是需要用每一行的长度去说到底就是不考虑数字放进去的顺序,只考虑状态怎么转移的;再此基础上还要考虑只有知道前面和左边的数字才能安放后面的数字这里像下面这么写会m掉。但是我看到一个大佬这接在定义的时候限制因为数据不大,所以直接在函数里面定义比如cin>>x; ll dp[x];#define _CRT_SECURE_NO_WARNINGS#include<stdio.h>#include<algori
2021-01-26 21:33:15
89
原创 POJ - 1179
POJ 1179传送口“多边形游戏”是一款单人益智游戏。游戏开始时,给定玩家一个具有N个顶点N条边(编号1-N)的多边形,如图1所示,其中N = 4。每个顶点上写有一个整数,每个边上标有一个运算符+(加号)或运算符*(乘号)。第一步,玩家选择一条边,将它删除。接下来在进行N-1步,在每一步中,玩家选择一条边,把这条边以及该边连接的两个顶点用一个新的顶点代替,新顶点上的整数值等于删去的两个顶点上的数按照删去的边上标有的符号进行计算得到的结果。下面是用图1给出的四边形进行游戏的全过程。1179
2021-01-24 19:08:45
109
原创 Unique Snowflakes UVA - 11572queue和sort尺取法,简单AC
Unique Snowflakes UVA - 11572题目如下Emily the entrepreneur has a cool business idea: packaging and selling snowflakes. She has devised amachine that captures snowflakes as they fall, and serializes th...
2020-04-11 23:37:23
126
原创 HDU_1584 A strange lift:BFS
HDU_1584 A strange lift:BFSThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and...
2020-04-11 22:02:24
112
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人