自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Jimmy_King

Article Comprehension Master

  • 博客(71)
  • 收藏
  • 关注

原创 矩阵快速幂模板

矩阵快速幂取模数加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 139

原创 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 261

原创 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 311

原创 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 251

原创 【计算几何,向量,圆】

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 264

原创 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 225

原创 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 173

原创 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 167

原创 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 589

原创 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 195

原创 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 203

原创 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 342

原创 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 339

原创 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 644

原创 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 391

原创 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 473

原创 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 171

原创 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 183

原创 树链剖分模板

#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 131

原创 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 173

原创 [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 530

原创 [USACO18JAN]MooTube【并查集】

Farmer John

2018-04-21 17:35:30 2257

原创 centos7 服务器配置备忘

mariadb安装yum update -yyum install mariadb mariadb-server -ysystemctl start mariadbmysql_secure_installation配置utf8在/etc/mycnf [mysqld]标签下添加下面内容character-set-server = utf8编辑/etc...

2018-03-27 18:32:45 170

原创 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 238

原创 二维线段树之降维打击

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 450

原创 Yet Another Tree Query Problem(二维线段树)

Yet Another Tree Query Problem

2018-03-11 11:54:20 363

原创 线段树(动态建点)

敌兵布阵

2018-03-05 18:24:08 369

原创 小小粉丝度度熊【尺取】

小小粉丝度度熊

2018-02-03 13:06:01 159

原创 Chess

Chess

2018-02-03 13:05:14 125

原创 度度熊的01世界

度度熊的01世界

2018-02-03 13:04:20 276

原创 Winning Cells

GYM-101608-M

2018-02-03 12:58:02 242

原创 机器人指令缩减【模拟】

CF-GYM-101608-E

2018-02-03 12:38:23 229

原创 页面置换算法

CF-GYM-101498-F

2018-02-03 12:37:05 267

原创 Arthur's Language

CF-101628-A

2018-02-03 12:35:33 292

原创 宇宙通信

CF-101466-CLately the communication between planets has been an important issue, which is why the Earth has made many efforts to be connected to every other planet in the universe. The Universal N

2018-02-03 12:34:31 442

原创 Lucas 组合数取模

组合数取模就是求 CnmmodpCmnmodpC^n_m\mod p 的值,当然根据n,m,pn,m,pn,m,p的取值范围不同,采取的方法也不一样。 ppp比较大就只能一个一个算如LL C_one_by_one(LL n, LL m)//组合数一个一个算但是不是很大的要预先处理好阶乘 数很大需要逆元typedef long long LL;LL MOD;LL fac[...

2018-01-31 20:53:05 193

原创 分糖果

CF-gym-334-AGerald has n younger brothers and their number happens to be even. One day he bought n2 candy bags. One bag has one candy, one bag has two candies, one bag has three candies and so on. I

2018-01-29 20:16:26 211

原创 JavaScript & php 正则表达式

百度搜出来这东西。。。 PHP中创建字符串,使用正则匹配函数,返回true/false$pattern="/\w{6,20}/";$str="djkduhgk";preg_match($pattern,$str);?>JavaScript可以是创建正则表达式对象,使用正则的test方法返回true/false,也可以是字符串里的search方法返回第一个匹配的位置scri

2018-01-08 15:56:52 165

原创 Sunday 字符串匹配

主串为s,模式串为p s=abcdefg p=efgi abcdefgj efg首先从头开始比较,第一个字符不一样,那么新的下标m=i+ p.length,即s[m]=’d’然后在p中从后往前找’d’ ,即if(p[k]==s[m])发现没有则将p后移到e,即s[i]=’e’,p[j]=’e’若有则移动p使得下标k与m对齐int sunday(string s,string p ){

2018-01-07 15:30:08 188

原创 Gym - 101612A 点亮数字

Auxiliary Project

2017-11-27 23:29:48 326

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除