摘要:
P3084 [USACO13OPEN]照片Photo 农夫约翰决定给站在一条线上的N(1 ⇐ N ⇐ 200,000)头奶牛制作一张全家福照片,N头奶牛编号1到N。 于是约翰拍摄了M(1 ⇐ M ⇐ 100,000)张照片,每张照片都覆盖了连续一段奶牛:第i张照片中包含了编号a_i 到 b_i的奶牛 阅读全文
posted @ 2020-12-18 17:23
肆之月
阅读(336)
评论(0)
推荐(0)
摘要:
P2467 [SDOI2010]地精部落 题目描述 传说很久以前,大地上居住着一种神秘的生物:地精。 地精喜欢住在连绵不绝的山脉中。具体地说,一座长度为N的山脉H可分为从左到右的N段,每段有一个独一无二的高度Hi,其中Hi是1到N之间的正整数。 如果一段山脉比所有与它相邻的山脉都高,则这段山脉是一个 阅读全文
posted @ 2020-12-18 17:21
肆之月
阅读(99)
评论(0)
推荐(0)
摘要:
Lights inside 3D Grid You are given a 3D grid, which has dimensions X, Y and Z. Each of the X x Y x Z cells contains a light. Initially all lights are 阅读全文
posted @ 2020-12-18 17:19
肆之月
阅读(97)
评论(0)
推荐(0)
摘要:
Discovering Gold You are in a cave, a long cave! The cave can be represented by a 1 x N grid. Each cell of the cave can contain any amount of gold. In 阅读全文
posted @ 2020-12-18 17:18
肆之月
阅读(112)
评论(0)
推荐(0)
摘要:
A Dangerous Maze You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probability for choosing a door 阅读全文
posted @ 2020-12-18 17:17
肆之月
阅读(122)
评论(0)
推荐(0)
摘要:
String painter Problem Description There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a pow 阅读全文
posted @ 2020-12-18 17:16
肆之月
阅读(98)
评论(0)
推荐(0)
摘要:
HUD-3507 Zero has an old printer that doesn't work well sometimes. As it is antique, he still like to use it to print articles. But it is too old to w 阅读全文
posted @ 2020-12-18 17:15
肆之月
阅读(76)
评论(0)
推荐(0)
摘要:
P4544 [USACO10NOV]购买饲料Buying Feed 约翰开车来到镇上,他要带KK吨饲料回家。运送饲料是需要花钱的,如果他的车上有XX吨饲料,每公里就要花费$X2$ 元,开车D公里就需要$D\times X2$ 元。约翰可以从N家商店购买饲料,所有商店都在一个坐标轴上,第ii家店的位置 阅读全文
posted @ 2020-12-18 17:13
肆之月
阅读(84)
评论(0)
推荐(0)
摘要:
Test for Job Mr.Dog was fired by his company. In order to support his family, he must find a new job as soon as possible. Nowadays, It's hard to have 阅读全文
posted @ 2020-12-18 17:12
肆之月
阅读(68)
评论(0)
推荐(0)
摘要:
Delete 题目描述 给定一张n个点,m条边的带权有向无环图,同时给定起点S和终点T,一共有q个询问,每次询问删掉某个点和所有与它相连的边之后S到T的最短路,询问之间互相独立(即删除操作在询问结束之后会立即撤销),如果删了那个点后不存在S到T的最短路,则输出-1。 输入描述: 第一行四个正整数表示 阅读全文
posted @ 2020-12-18 17:11
肆之月
阅读(119)
评论(0)
推荐(0)
摘要:
MMSet2 给定一棵n个节点的树,点编号为1…n。 Q次询问,每次询问给定一个点集S,令,\(f(u)=\max_{v\in S}dist(u,v)\) 你需要求出$\min_f(u)$ 其中dist(u,v)表示树上路径(u,v)的边数。 输入描述: 第一行一个整数n,接下来n−1行每行两个整数 阅读全文
posted @ 2020-12-18 17:08
肆之月
阅读(229)
评论(0)
推荐(0)
摘要:
POJ3071 Description Consider a single-elimination football tournament involving $2n$ teams, denoted $1, 2, …, 2n$. In each round of the tournament, al 阅读全文
posted @ 2020-12-18 17:06
肆之月
阅读(118)
评论(0)
推荐(0)
摘要:
高斯消元 时间复杂度:\(O(n^3)\) /* n行:[0,n) m列:[0,m) m=2n时,右侧矩阵是左侧矩阵的逆 m=n+1时,右侧一列是左侧方程组的解 */ //double double a[][]; bool gauss(int n,int m){ for(int i=0,r=0;i< 阅读全文
posted @ 2020-12-18 17:03
肆之月
阅读(157)
评论(0)
推荐(0)
摘要:
You Are the One The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show 阅读全文
posted @ 2020-12-18 16:59
肆之月
阅读(95)
评论(0)
推荐(0)
摘要:
struct pt{ double x,y; }k[MAXN]; bool cross(const pt&a,const pt&b,const pt&z){//za叉乘zb向量 return (a.x-z.x)*(b.y-z.y)-(a.y-z.y)*(b.x-z.x)>=0; } bool cmp 阅读全文
posted @ 2020-12-18 16:57
肆之月
阅读(58)
评论(0)
推荐(0)

浙公网安备 33010602011771号