自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(293)
  • 收藏
  • 关注

原创 Input.GetAxis用法

GetAxis()两种:Vertical:获得垂直方向。Horizontal:获得水平方向。 控制坦克移动旋转脚本如下:  using System.Collections;using System.Collections.Generic;using UnityEngine;public class TankController : MonoBehaviour...

2019-02-18 19:46:14 21383

原创 常用API之脚本生命周期

using System.Collections;using System.Collections.Generic;using UnityEngine;public class CubeLife : MonoBehaviour{ private void Awake() /*唤醒时间,执行一次*/ { Debug.Log("Awake"); }...

2019-01-20 17:23:25 307

原创 POJ 2966 k-d Tree

 题意:二维平面中有n个点,求每个点和其他点的最远距离 #include<stdio.h>#include<iostream>#include<string.h>#include<algorithm>using namespace std;#define ll long longconst int maxm = 1000...

2018-12-16 20:16:57 339

原创 面向对象:里氏转换原则

里氏转换原则:1 子类对象可以直接赋值给父类对象;2 子类对象可以调用父类中的成员,但是父类对象永远只能调用自己的成员;3 如果父类对象中装的是子类对象,可以将这个父类对象强制转化为子类对象; is 和 asis和asdo都可以进行类型转换is:如果转换成功返回True,否则返回false;bool ok = ct is Tiger;Console.WriteL...

2018-12-04 20:47:55 2641

原创 codeforces 131D Subway

D. Subwaytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA subway scheme, classic for all Berland cities is represented by a set...

2018-11-16 16:05:03 274

原创 牛客网 wannafly挑战赛 28 B msc和mcc

链接:https://ac.nowcoder.com/acm/contest/217/B来源:牛客网 msc和mcc是一对好朋友,有一天他们得到了一个长度为n的字符串s.这个字符串s十分妙,其中只有’m’,’s’和’c’三种字符。定义s[i,j]表示s中从第i个到第j个字符按顺序拼接起来得到的字符串。定义一个字符串t的子序列为从t中选出一些位置并且将这些位置上面的字符按顺序拼接...

2018-11-09 21:53:52 355

原创 2017ICPC西安 H Arrangement for Contests

题意:有n重问题,难度i的题目个数为ai个,每套题目有k个题且题目难度必须连续,问最多可以有多少套题目贪心,每次尽量选最靠前的连续区间,用线段树维护一下。#include<stdio.h>#include<algorithm>#include<string.h>using namespace std;#define ll long longc...

2018-11-07 22:50:32 1170

原创 ZOJ 3494 BCD Code AC自动机+数位dp

Binary-coded decimal (BCD) is an encoding for decimal numbers in which each digit is represented by its own binary sequence. To encode a decimal number using the common BCD encoding, each decimal digi...

2018-10-31 20:54:58 201

原创 HDU 3247 Resource Archiver AC自动机+BFS+dp

Resource Archiver Great! Your new software is almost finished! The only thing left to do is archiving all your n resource files into a big one. Wait a minute… you realized that it isn’t as easy a...

2018-10-31 17:39:38 253

原创 ZOJ 3228 Searching the String

Searching the StringTime Limit: 7 Seconds      Memory Limit: 129872 KBLittle jay really hates to deal with string. But moondy likes it very much, and she's so mischievous that she often gives jay ...

2018-10-27 21:00:31 253

原创 hdu 2243 考研路茫茫――单词情结 AC自动机+矩阵快速幂

考研路茫茫——单词情结Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7067    Accepted Submission(s): 2478Problem Description背单词,始终是复习英语的重要环节。在荒废了3年...

2018-10-24 19:41:28 175

原创 poj 2778 DNA Sequence AC自动机+矩阵快速幂

DNA SequenceTime Limit: 1000MS   Memory Limit: 65536K Total Submissions: 19923   Accepted: 7585 DescriptionIt's well known that DNA Sequence is a sequence only contains A, C, T and...

2018-10-23 22:04:10 148

原创 HDU 2896 病毒入侵 AC自动机

病毒侵袭Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 37537    Accepted Submission(s): 8304 Problem Description当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最...

2018-10-22 16:56:07 138

原创 BZOJ 1030: [JSOI2007]文本生成器 AC自动机+dp

1030: [JSOI2007]文本生成器Time Limit: 1 Sec  Memory Limit: 162 MBSubmit: 6261  Solved: 2665[Submit][Status][Discuss]Description  JSOI交给队员ZYX一个任务,编制一个称之为“文本生成器”的电脑软件:该软件的使用者是一些低幼人群,他们现在使用的是GW文本生成器v...

2018-10-19 17:14:48 136

原创 ACM-ICPC 2017 Asia Urumqi I. A Possible Tree 带权并查集

Alice knows that Bob has a secret tree (in terms of graph theory) with n nodes with n -1n−1 weighted edges with integer values in [0, 260 - 1][0,260−1]. She knows its structure but does not know the s...

2018-10-17 12:56:47 194

原创 ACM-ICPC 2017 Asia Urumqi A. Coins 概率dp

Alice and Bob are playing a simple game. They line up a row of nn identical coins, all with the heads facing down onto the table and the tails upward.For exactly mm times they select any kk of the c...

2018-10-16 15:45:43 226

原创 ZOJ 2314 Reactor Cooling 有下界的网络流

Reactor CoolingTime Limit: 5 Seconds      Memory Limit: 32768 KB      Special JudgeThe terrorist group leaded by a well known international terrorist Ben Bladen is buliding a nuclear reactor to pr...

2018-10-12 15:52:18 173

原创 codeforces 367 D. Vasiliy's Multiset

D. Vasiliy's Multisettime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAuthor has gone out of the stories about Vasiliy, so here i...

2018-10-12 15:24:12 196

原创 Codeforces Round #375 (Div. 2) D Lakes in Berland

E. One-Way Reformtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n cities and m two-way roads in Berland, each road co...

2018-10-10 15:29:46 205

原创 codeforces 367 E. Working routine

E. Working routinetime limit per test2.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasiliy finally got to work, where there is a huge amount of...

2018-10-08 15:56:19 448

原创 hdu 5988 费用流

Coding ContestTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 4971    Accepted Submission(s): 1156 Problem DescriptionA coding contest w...

2018-10-07 16:16:00 185

原创 牛客练习赛 数据结构 线段树

链接:https://www.nowcoder.com/acm/contest/200/B来源:牛客网 qn姐姐最好了~    qn姐姐给你了一个长度为n的序列还有m次操作让你玩,    1 l r 询问区间[l,r]内的元素和    2 l r 询问区间[l,r]内的元素的平方 和    3 l r x 将区间[l,r]内的每一个元素都乘上x    4 l r x 将...

2018-10-05 21:37:38 315

原创 UVA 10480 Sabotage

题意:先有一个连通图,每个边都有边权,删除一个边的花费为该边的边权,问使得点1和点2失去连通所用的最小花费需要删除哪几条边最小割=最大流,将边权视为流量,跑出最大流,输出路径。#include<stdio.h>#include<algorithm>#include<string.h>#include<string>#includ...

2018-10-03 19:45:43 181

原创 HDU 4292 Food 最大流

FoodTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7825    Accepted Submission(s): 2591 Problem Description  You, a part-time dining se...

2018-10-02 19:37:13 129

原创 洛谷 P4722 最大流最快模板

题意:直接给出网络流建图信息,求最大流 一般的dinic算法和isap算法复杂度为O(n^2m),此题有专门数据会卡这两个算法。因此一种复杂度上界在常用最大流算法中最优的最高标号预留推进算法(又叫HLPPHLPP),其上界为O(n^2 \sqrt m),并且在经过优化后这种算法在数据随机的情况下速度也不亚于上述两种增广路算法。不会,直接上板子以后用。#include<c...

2018-09-30 16:02:30 390

原创 POJ1087 A Plug for UNIX 最大流

A Plug for UNIXTime Limit: 1000MS   Memory Limit: 65536K Total Submissions: 19053   Accepted: 6632 DescriptionYou are in charge of setting up the press room for the inaugural meeti...

2018-09-30 15:36:14 181

原创 洛谷P3804 后缀自动机

题目描述给定一个只包含小写字母的字符串SS,请你求出 SS 的所有出现次数不为 11 的子串的出现次数乘上该子串长度的最大值。输入输出格式输入格式: 一行一个仅包含小写字母的字符串SS 输出格式: 一个整数,为 所求答案 输入输出样例输入样例#1: 复制abab输出样例#1: 复制4#include<stdio.h&g...

2018-09-25 21:55:33 201

原创 BZOJ 3998: [TJOI2015]弦论 后缀自动机

3998: [TJOI2015]弦论Time Limit: 10 Sec  Memory Limit: 256 MBSubmit: 4251  Solved: 1562[Submit][Status][Discuss]Description对于一个给定长度为N的字符串,求它的第K小子串是什么。Input 第一行是一个仅由小写英文字母构成的字符串S第二行为两个整数T和K,...

2018-09-25 20:07:03 179

原创 POJ 3450 后缀自动机

Corporate IdentityTime Limit: 3000MS   Memory Limit: 65536K Total Submissions: 8538   Accepted: 2853 DescriptionBeside other services, ACM helps companies to clearly state their “c...

2018-09-25 17:37:41 185

原创 codevs3160 两个串的最长公共子串 后缀自动机

题目描述 Description给出两个由小写字母组成的字符串,求它们的最长公共子串的长度。输入描述 Input Description读入两个字符串输出描述 Output Description输出最长公共子串的长度样例输入 Sample Inputyeshowmuchiloveyoumydearmotherreallyicannotbelieveityeapho...

2018-09-24 21:55:50 335

原创 HDU 4622 后缀自动机

ReincarnationTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 4673    Accepted Submission(s): 1916 Problem DescriptionNow you are back,a...

2018-09-22 20:52:13 222

原创 HDU 2222 AC自动机模板题

Keywords SearchTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 78006    Accepted Submission(s): 27074 Problem DescriptionIn the modern...

2018-09-05 21:50:20 120

原创 HDU 6286 2018

2018Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 587    Accepted Submission(s): 313 Problem DescriptionGiven a,b,c,d, find out the nu...

2018-08-26 21:21:15 242

原创 HDU 6282 String Transformation

String TransformationTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 553    Accepted Submission(s): 175 Problem DescriptionBobo has a st...

2018-08-26 21:11:13 287

原创 2018 Multi-University Training Contest 10 Problem L.Videos

Problem L.VideosTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0 Problem DescriptionC-bacteria takes cha...

2018-08-22 23:36:23 168

原创 大整数模板

#include<stdio.h>#include<string.h>#include<string>#include<iostream>using namespace std;#define LL long longint ten[4] = {1,10,100,1000};typedef struct BigNumber{ ...

2018-08-22 12:06:29 186

原创 2018 Multi-University Training Contest 7 1011 Swordsman

 题意:英雄有k种属性,现在面对n个怪兽,每个怪兽也有k个属性与英雄对应,如果英雄的每项属性都不低于某个怪兽,那么他就可以杀死它并且一一加上怪兽的所有属性,求英雄最多可以杀死几只怪兽并输出怪兽编号 一个怪兽只能被杀一次,说明只需要遍历一次这个怪兽的所有属性即可,可以对每种属性记录所属怪兽编号并单独排序,这样可以得到k组数据,每组数据的属性种类都相同且升序,那么每一轮只要依次遍历k...

2018-08-21 16:28:27 110

原创 2018 Multi-University Training Contest 7 1010

题意:给出A,B,C,D,P,n,根据地推公式求出第n项首先把这个递推公式化成矩阵公式,发现p/n项会变化,所以无法直接求矩阵,但是每个p/n都有一个连续的固定值,所以可以暴力出所有p/n的值,再化成矩阵求快速幂。#include<stdio.h>#include<algorithm>#include<vector>#include<q...

2018-08-21 16:18:30 173

原创 2018 Multi-University Training Contest 7 1001 Age of Moyu

Age of MoyuTime Limit: 5000/2500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 4523    Accepted Submission(s): 430 Problem DescriptionMr.Quin love fishes ...

2018-08-21 16:12:45 123

原创 牛客网多校第八场 G Counting regions

链接:https://www.nowcoder.com/acm/contest/146/G来源:牛客网 Niuniu likes mathematics. He also likes drawing pictures. One day, he was trying to draw a regular polygon with n vertices. He connected every p...

2018-08-14 15:12:13 226

空空如也

空空如也

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

TA关注的人

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