3 安静de想着网名

尚未进行身份认证

300字以内

等级
TA的排名 11w+

矩阵快速幂模板

矩阵快速幂取模数加const!!!!!const ll m = 123456789;ll k;int N = 6;struct matrix{ ll g[N][N]; matrix operator=(const matrix &b) { for (int i = 0; i < n; i++) { ...

2019-03-17 19:42:53

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

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

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

【计算几何,向量,圆】

struct Vector{ double x, y; Vector() {} Vector(double a, double b) { x = a; y = b; } Vector operator-(Vector a) { return Vector(x - a.x, y - a.y); } Vector(Vector b, Vector a) { x...

2018-07-29 14:17:32

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

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

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

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

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

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

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

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

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

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

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

splay

#include<iostream>#include<stdio.h>#include<string>#include<string.h>#include<algorithm>using namespace std;const int MAXN = 100000 + 55;int L[MAXN], R[MAXN], F[MA...

2018-04-27 19:06:44

LCA 模板tarjan,欧拉序

#include<iostream>#include<stdio.h>#include<vector>#include<algorithm>#include<string.h>using namespace std;typedef long long LL;const int

2018-04-26 16:42:18

树链剖分模板

#include<iostream>#include<stdio.h>#include<vector>#include<algorithm>#include<string.h>using namespace std;typedef long long LL;const int MAXN = 100000 + 5;LL aa...

2018-04-25 19:13:50

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

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!