自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 HDU-1253 胜利大逃亡 (bfs-时间???)

Ignatius被魔王抓走了,有一天魔王出差去了,这可是Ignatius逃亡的好机会.魔王住在一个城堡里,城堡是一个ABC的立方体,可以被表示成A个B*C的矩阵,刚开始Ignatius被关在(0,0,0)的位置,离开城堡的门在(A-1,B-1,C-1)的位置,现在知道魔王将在T分钟后回到城堡,Ignatius每分钟能从一个坐标走到相邻的六个坐标中的其中一个.现在给你城堡的地图,请你计算出Ignatius能否在魔王回来前离开城堡(只要走到出口就算离开城堡,如果走到出口的时候魔王刚好回来也算逃亡成功),如果可

2020-08-15 11:04:20 116

原创 acwing 动态中位数 (对顶堆)

依次读入一个整数序列,每当已经读入的整数个数为奇数时,输出已读入的整数构成的序列的中位数。输入格式第一行输入一个整数P,代表后面数据集的个数,接下来若干行输入各个数据集。每个数据集的第一行首先输入一个代表数据集的编号的整数。然后输入一个整数M,代表数据集中包含数据的个数,M一定为奇数,数据之间用空格隔开。数据集的剩余行由数据集的数据构成,每行包含10个数据,最后一行数据量可能少于10个,数据之间用空格隔开。输出格式对于每个数据集,第一行输出两个整数,分别代表数据集的编号以及输出中位数的个数(应

2020-08-02 17:55:47 135

原创 Balanced Lineup (树状数组 时间???)

Balanced LineupTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 80158 Accepted: 36581Case Time Limit: 2000MSDescriptionFor the daily milking, Farmer John’s N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decide

2020-07-19 13:24:55 180

原创 Virtual Friends (并查集 map )

These days, you can do all sorts of things online. For example, you can use various websites to make virtual friends. For some people, growing their social network (their friends, their friends’ friends, their friends’ friends’ friends, and so on), has bec

2020-05-16 11:39:29 129

原创 K-th Number (主席树-记录每一个瞬间!!!)

You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able to return quic...

2020-05-04 17:34:25 140

原创 Fiddler 手机 抓包 (**部分应用**)连不上网 完美 解决!!!

完全连不上网可查看以下链接this.一部分应用可以连上网使用的工具是:Xposed+JustTrustMe说到底还是证书不过关 JustTrustMe 可以绕过证书 神级软件;Xposed 需要 root 建议在 vmos 中 开启否则可能变砖!!!启用代理 :在设置中搜索w 就可以找到 WiFi 了备忘录fiddler 使用 e~~~....

2020-04-23 17:36:41 4319

原创 Android 修复 IMEI码

拨号*#7465625#或*##3646633##* 进入 工程模式选择 connectivity选择 cds information选择 radio information选择任意现在键入以下命令:卡槽1 : AT (AT和+中间有一个空格)+ EGMR=1,7,“IMEI_01”,卡槽2 : AT (AT和+中间有一个空格)+ EGMR=1,10,“IMEI...

2020-04-21 16:01:08 474

原创 POJ - 1274 The Perfect Stall (二分图匹配)

Farmer John completed his new barn just last week, complete with all the latest milking technology. Unfortunately, due to engineering problems, all the stalls in the new barn are different. For the fi...

2020-04-19 12:32:08 144

原创 最大流 ( Dinic -- 时间都去哪了???)

Network flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighted directed graph.InputThe first line of input contains an integer T...

2020-04-18 17:14:41 89

原创 打地鼠 --- 树 game

#pragma warning(disable: 4996)#include <stdio.h>#include <stdlib.h>#include <windows.h>#include <time.h>#include <conio.h>#include "iostream"#include"unistd.h"#in...

2020-04-16 09:53:03 94

原创 消消乐小游戏

游戏展示文章目录游戏展示界面展示启动界面选择界面开始游戏炮弹为空游戏胜利游戏失败退出游戏游戏中过程解析游戏每秒进行的操作按下s / S按下w / W队列元素小于等于三队列元素大于等于一圈的元素数量数据结构栈链表队列游戏对象特色游戏函数全部封装进结构体 调用方便代码清晰大量使用插入删除 使用链表进行辅助操作使用多线程 使键盘输入与程序运行相分离完成游戏操作界面优化 ...

2020-04-16 09:49:09 534

原创 C - Just a Hook (线段树-区间更新)

In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same length.Now Pudge wa...

2020-04-09 22:42:05 171

原创 Simpsons’ Hidden Talents (kmp--next[])

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 21712 Accepted Submission(s): 7397Problem DescriptionHomer: Marge, I just figured out a wa...

2020-04-09 11:39:31 114

原创 Euclid's Game (博弈--有两种选择的人必赢 )

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6259 Accepted Submission(s): 2939Problem DescriptionTwo players, Stan and Ollie, play, sta...

2020-04-08 23:06:03 278

原创 Brackets (区间dp)

Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 17618 Accepted: 9095DescriptionWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regul...

2020-04-08 22:31:54 163

原创 统计难题(字典树)

Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分是一连串的提问,每行一个提问,每个提问都是一个字符串.注意:本题...

2020-04-05 22:10:54 194

原创 dp (--寻找我的小弟-- 和我一样的了)

dp[i]=d[i-1]*a+dp[i-2]*b+c…

2020-04-05 16:25:12 79

原创 Xor Sum (字典树-- 数组 大?小?)

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others)Total Submission(s): 9424 Accepted Submission(s): 3891Problem DescriptionZeus 和 Prometheus 做了一个游戏,Prometheus ...

2020-04-05 12:29:59 152

原创 Berland Fair CodeForces - 1073D (单调栈优化 无用???)

XXI Berland Annual Fair is coming really soon! Traditionally fair consists of n booths, arranged in a circle. The booths are numbered 1 through n clockwise with n being adjacent to 1. The i-th booths ...

2020-04-04 17:28:14 119

原创 js 函数参数可以为函数

function a(x){x();}a(function ss(){alert(“hh”);})函数参数 可以为 函数

2020-04-02 21:48:52 740

原创 js 变量 赋值 or 引用?

js基本数据类型包括:undefined,null,number,boolean,string.基本数据 = 是赋值引用类型,也可以说是对象,比如:Object,Array,Function,Data等引用类型 = 是赋予地址...

2020-04-02 21:02:38 151

原创 微信小程序 (总结)

opacity: 0.3; 透明度;margin:auto=margin:auto auto auto auto表示上下左右都为auto;margin:0 auto=margin:0 auto 0 auto,表示上下为0,左右为auto;margin:auto表示横竖都居中,margin: 0 auto表示横居中,竖不居中;margin后面一般会跟4个参数,如margin:1px、1px、...

2020-04-01 17:02:33 239

原创 女孩的研究 (马拉车)

One day, sailormoon girls are so delighted that they intend to research about palindromic strings. Operation contains two steps:First step: girls will write a long string (only contains lower case) o...

2020-03-25 20:29:28 156

原创 最长回文 (Manacher 三目运算符???)

给出一个只由小写英文字符a,b,c…y,z组成的字符串S,求S中最长回文串的长度.回文就是正反读都是一样的字符串,如aba, abba等Input输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c…y,z组成的字符串S两组case之间由空行隔开(该空行不用处理)字符串长度len <= 110000Output每一行一个整数x,对应一组case,表示该组ca...

2020-03-25 19:51:19 99

原创 Count Subrectangles (枚举)

You are given an array a of length n and array b of length m both consisting of only integers 0 and 1. Consider a matrix c of size n×m formed by following rule: ci,j=ai⋅bj (i.e. ai multiplied by bj). ...

2020-03-22 12:24:23 217

原创 Dominated Subarray (算是贪心吧 -- 数组没事别开太大会超时的哎!!!(memset))

Let’s call an array t dominated by value v in the next situation.At first, array t should have at least 2 elements. Now, let’s calculate number of occurrences of each number num in t and define it as...

2020-03-22 11:03:40 192

原创 Number Sequence (kmp .-)

Given two sequences of numbers : a[1], a[2], … , a[N], and b[1], b[2], … , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = b[1], a[K + 1] = b[2...

2020-03-21 11:52:39 89

原创 我的空间 我的想法 专注 一张四维图 时间

.

2020-03-15 22:40:22 82

原创 推式子 (用自己求自己)( % 构造新的自变量 数论么?,先乘后除(%) 要小心 )

Vasya likes to solve equations. Today he wants to solve (x div k)⋅(xmodk)=n, where div and mod stand for integer division and modulo operations (refer to the Notes below for exact definition). In this...

2020-03-15 12:05:24 113

原创 Harmonious Graph (并查集 —父亲为最大值)

You’re given an undirected graph with n nodes and m edges. Nodes are numbered from 1 to n.The graph is considered harmonious if and only if the following property holds:For every triple of integers ...

2020-03-14 21:09:08 185

原创 Find a way (双bfs、重载小于号是要全(map)!!!)

Find a wayTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 35884 Accepted Submission(s): 11404Problem DescriptionPass a year learning in H...

2020-03-14 11:24:14 106

原创 The Luckiest number (ksm + ksadd +数论+ euler + bug %lld?%d )

Chinese people think of ‘8’ as the lucky digit. Bob also likes digit ‘8’. Moreover, Bob has his own lucky number L. Now he wants to construct his luckiest number which is the minimum among all positiv...

2020-03-12 21:52:22 81

原创 Sliding Window(单调队列)

An array of size n ≤ 10 6 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each tim...

2020-03-10 18:37:14 149

原创 Terrible Sets (单调栈)

Let N be the set of all natural numbers {0 , 1 , 2 , . . . }, and R be the set of all real numbers. wi, hi for i = 1 . . . n are some elements in N, and w0 = 0.Define set B = {< x, y > | x, y ∈...

2020-03-10 18:35:27 166

原创 Feel Good(单调栈)ans == 0 ?-1;

Feel GoodTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 23748 Accepted: 6480Case Time Limit: 1000MS Special JudgeDescriptionBill is developing a new mathematical theory for human em...

2020-03-10 17:12:25 118

原创 Prime Distance (大素数 -- 双筛)

The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the question of primali...

2020-03-08 22:00:22 303

原创 对局匹配 蓝桥 (dp,找矛盾,分组,排除矛盾)

试题 历届试题 对局匹配资源限制时间限制:1.0s 内存限制:256.0MB问题描述  小明喜欢在一个围棋网站上找别人在线对弈。这个网站上所有注册用户都有一个积分,代表他的围棋水平。小明发现网站的自动对局系统在匹配对手时,只会将积分差恰好是K的两名用户匹配在一起。如果两人分差小于或大于K,系统都不会将他们匹配。现在小明知道这个网站总共有N名用户,以及他们的积分分别是A1, A2, ...

2020-03-07 20:11:39 76

原创 Journey Planning CodeForces (根--找相同)

Tanya wants to go on a journey across the cities of Berland. There are n cities situated along the main railroad line of Berland, and these cities are numbered from 1 to n.Tanya plans her journey as ...

2020-03-07 11:45:13 107

原创 九宫幻方 蓝桥(模模模)

试题 历届试题 九宫幻方资源限制时间限制:1.0s 内存限制:256.0MB问题描述  小明最近在教邻居家的小朋友小学奥数,而最近正好讲述到了三阶幻方这个部分,三阶幻方指的是将1~9不重复的填入一个3*3的矩阵当中,使得每一行、每一列和每一条对角线的和都是相同的。三阶幻方又被称作九宫格,在小学奥数里有一句非常有名的口诀:“二四为肩,六八为足,左三右七,戴九履一,五居其中”,通过这样的...

2020-03-06 22:40:43 106

原创 包子凑数 蓝桥(数论+dp)

试题 历届试题 包子凑数资源限制时间限制:1.0s 内存限制:256.0MB问题描述  小明几乎每天早晨都会在一家包子铺吃早餐。他发现这家包子铺有N种蒸笼,其中第i种蒸笼恰好能放Ai个包子。每种蒸笼都有非常多笼,可以认为是无限笼。每当有顾客想买X个包子,卖包子的大叔就会迅速选出若干笼包子来,使得这若干笼中恰好一共有X个包子。比如一共有3种蒸笼,分别能放3、4和5个包子。当顾客想买11...

2020-03-06 22:04:21 129

空空如也

空空如也

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

TA关注的人

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