自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Alex_McAvoy的博客

想要成为渔夫的猎手

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

原创 Problem b(BZOJ-2301/HAOI-2011)

Problem Description对于给出的 n 个询问,每次求有多少个数对 (x,y) ,满足 a ≤ x ≤ b , c ≤ y ≤ d ,且 gcd(x,y) = k , gcd(x,y) 函数为 x 和 y 的最大公约数。Input第一行一个整数n,接下来n行每行五个整数,分别表示a、b、c、d、kOutput共n行,每行一个整数表示满足要求的数对(x,y)的个数...

2019-08-31 10:21:12 330

原创 Easy Math(2018 ACM-ICPC 徐州赛区网络赛 D)

Problem DescriptionGiven a positive integersn, Mobius function μ(n)is defined as follows:are different prime numbers.Given two integersmm,nn, please calculateInputOne line includes...

2019-08-30 11:14:23 298

原创 Hard to prepare(2018 ACM-ICPC 徐州赛区网络赛 A)

Problem DescriptionAfter Incident, a feast is usually held in Hakurei Shrine. This time Reimu asked Kokoro to deliver a Nogaku show during the feast. To enjoy the show, every audience has to wear a...

2019-08-30 10:02:04 335 1

原创 Minimum Distance in a Star Graph(2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 J)

Problem DescriptionIn this problem, we will define a graph called star graph, and the question is to find the minimum distance between two given nodes in the star graph.Given an integernn, ann-...

2019-08-29 10:55:55 215 1

原创 Train Seats Reservation(2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 B)

Problem DescriptionYou are given a list of train stations, say from the station 1to the station 100.The passengers can order several tickets from one station to another before the train leaves t...

2019-08-29 10:05:54 134

原创 Weather Patterns(2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 A)

Problem DescriptionConsider a system which is described at any time as being in one of a set ofNdistinct states,1,2,3,...,N. We denote the time instants associated with state changes ast = 1,2,...

2019-08-29 09:57:32 781

原创 ZAP-Queries(洛谷-P3455)

题目描述FGD正在破解一段密码,他需要回答很多类似的问题:对于给定的整数a,b和d,有多少正整数对x,y,满足x<=a,y<=b,并且gcd(x,y)=d。作为FGD的同学,FGD希望得到你的帮助。输入输出格式输入格式:第一行一个整数T 表述数据组数接下来T行,每行三个正整数,表示 a,b.d输出格式:T行,每行一个整数表示第 i 组数据的结果输入输出...

2019-08-28 17:21:20 367

原创 YY的GCD(洛谷-P2257)

题目描述神犇YY虐完数论后给傻×kAc出了一题给定N, M,求1<=x<=N, 1<=y<=M且gcd(x, y)为质数的(x, y)有多少对kAc这种傻×必然不会了,于是向你来请教……多组输入输入输出格式输入格式:第一行一个整数T 表述数据组数接下来T行,每行两个正整数,表示N, M输出格式:T行,每行一个整数表示第i组数据的结果...

2019-08-28 16:40:37 650

原创 Maximum Flow(2017 ACM-ICPC 亚洲区(西安赛区)网络赛 E)

Problem DescriptionGiven a directed graph withnnnodes, labeled 0,1,⋯,n−1.For each<i, j>satisfies 0≤i<j<n, there exists an edge from the i-th node to the j-th node, the capacity of...

2019-08-28 10:30:11 219

原创 Coin(2017 ACM-ICPC 亚洲区(西安赛区)网络赛 B)

Problem DescriptionBob has a not even coin, every time he tosses the coin, the probability that the coin's front face up is).The question is, when Bob tosses the coinkktimes, what's the probab...

2019-08-28 09:36:10 185

原创 组合计数与反演 —— 反演

【概述】对于两个数列、,他们之间满足,此时,若已知数组 a 和数列,则可以推出那么反演过程就是找到一个数组 b,通过使用的值,来反推出,即:如果只考虑上面两个公式,整个方程组实际上是一个下三角矩阵的形式,因此从本质上来说,反演是一个解线性方程组的过程。引入克罗内克函数:由可得考虑反演的过程:,将代入,有:对于最后一步,实质上是交换了求和顺序...

2019-08-27 15:24:23 567

原创 Our Journey of Dalian Ends(2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 J)

Problem DescriptionLife is a journey, and the road we travel has twists and turns, which sometimes lead us to unexpected places and unexpected people.Now our journey of Dalian ends. To be careful...

2019-08-27 10:57:03 203

原创 Skiing(2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 H)

Problem DescriptionIn this winter holiday, Bob has a plan for skiing at the mountain resort.This ski resort hasMdifferent ski paths andNdifferent flags situated at those turning points.The...

2019-08-27 09:38:26 522

原创 Islands(2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 F)

Problem DescriptionOn the mysterious continent of Tamriel, there is a great empire founded by human.To develope the trade, the East Empire Company is set up to transport goods from place to place...

2019-08-27 09:34:33 280

原创 Banana(2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 A)

Problem DescriptionBananas are the favoured food of monkeys.In the forest, there is a Banana Company that provides bananas from different places.The company has two lists.The first list recor...

2019-08-27 09:10:52 21633

原创 Football Games(HDU-5873)

Problem DescriptionA mysterious country will hold a football world championships---Abnormal Cup, attracting football teams and fans from all around the world. This country is so mysterious that non...

2019-08-26 14:47:39 1056

原创 图论 —— 竞赛图

【概述】竞赛图是一定义在有向图上的概念,图中每对不同的顶点通过单个有向边连接,即每对顶点间都有一条有向边。设 D 为 n 阶有向简单图,若 D 的基图为 n 阶无向完全图,则 D 为 n 阶竞赛图。简单来说,竞赛图就是将完全无向图的无向边给定了方向。竞赛图有许多性质,比如在哈密顿问题中,对于 n 阶竞赛图,当 n 大于等于 2 时一定存在哈密顿通路,关于 n阶竞赛图下构造有向图的...

2019-08-26 11:26:10 15082

原创 Resistors in Parallel (Gym-102028E)

Problem DescriptionIn this physics problem, what we are concerned about are only resistors. If you are poor at physics, do not worry, since solving this problem does not require you to have advance...

2019-08-24 12:43:35 732

原创 训练日志 2019.8.23

今天正式开始网络赛打名额了,也标志着暑期训练快结束了,总结一下得失就个人而言,训练了一个假期,水平有些许提高,但以前的问题依然存在,学习习惯还是太差,只做到了把书读厚,没有做到把书读薄,知识点还是只掌握在表面,理解的还是不到位。碰到的难题该不会的还是不会,即使补了但下次遇到类似的题还是出不了,中等题有思路但往往不那么清晰,总要 WA 一两发才能 A,简单题思路基本秒出,但总会忘记注重细节。...

2019-08-23 22:28:51 165

原创 Distance (Gym-102028I)

Problem DescriptionThere are nn points on a horizontal line, labelled with 1 through nn from left to right.The distance between the i-th point and the (i+1)-th point is aiai.For each integer k ...

2019-08-23 22:12:13 370

原创 Honeycomb (Gym-102028F)

Problem DescriptionA honeycomb is a mass wax cells built by honey bees, which can be described as a regular tiling of the Euclidean plane, in which three hexagons meet at each internal vertex. The ...

2019-08-23 19:45:32 1008

转载 Keiichi Tsuchiya the Drift King(Gym-102028D)

Problem DescriptionDrifting is a driving style in which the driver uses the throttle, brakes, clutch, gear shifting and steering input to keep the car in a state of oversteer while manoeuvring from...

2019-08-23 19:11:29 539

原创 Xu Xiake in Henan Province(Gym-102028A)

Problem DescriptionShaolin Monastery, also known as the Shaolin Temple, is a Chan ("Zen") Buddhist temple in Dengfeng County, Henan Province. Believed to have been founded in the55-th century CE, ...

2019-08-23 10:44:00 582

原创 Arena Olympics(Gym-102267F)

Problem DescriptionKassandra is participating in the Arena Olympics of Sparta. In order to win the arena fight, she has to knockout all the other Nfighters.Being a computer scientist, she wanted...

2019-08-23 10:14:23 353

原创 Ultimate Army(Gym-102267I)

Problem Description3 days, that's how much time the king gave Daffy to find him the ultimate army organization plan before he cuts his head off.2 days already passed with no progress, but luckily...

2019-08-22 19:21:53 600

原创 Birthday Puzzle(Gym-102267K)

Problem DescriptionToday is the Birthday of a beautiful girl, she's happy and she's telling her friends loudly to bring her birthday gifts. One of her best friends who is fond of puzzles decided to...

2019-08-22 19:11:21 706

原创 Circle of Polygon(Gym-102267H)

Problem DescriptionA circumscribed circlecircumscribed circle of a polygon is the circle that passes through all the vertices of that polygon.Let's assume we have a regularregular polygon, we wan...

2019-08-22 19:03:44 520

原创 Robots Hard(Gym-102267E)

Problem DescriptionNotice that you need to read the statement of"D. Robots Easy"in order to understand this problem.Also notice theunusual 5 megabytes memory limit.Alice now is trying to b...

2019-08-22 10:26:34 475

原创 Robots Easy (Gym-102267D)

Problem DescriptionAlice was playing her favorite game, "Tales of the Abyss", while playing she encountered the following puzzle that can be described as a12×12grid:A robot is standing somewh...

2019-08-21 10:46:57 657

原创 Matryoshka Dolls (Gym-102267C)

Problem DescriptionMatryoshka Dolls are Russia's most popular souvenirs. They are sets of wooden figurines of decreasing size placed one inside another, though they have the same exact shape.Our ...

2019-08-21 10:19:41 1142

原创 Primes (Gym-102267B)

Problem DescriptionA prime number is a natural number greater than 1 and has exactly 2 divisors which are 1 and the number itself.You are given a prime number nn, find any 2 prime numbers aa and ...

2019-08-21 10:12:23 571

原创 Picky Eater (Gym-102267A)

Problem DescriptionOnce upon a time, Hamza was hungry, only leftover food could be found in the fridge, so he wanted to order online.Hamza currently has xJDs, and the sandwich he wants to buy co...

2019-08-21 09:52:06 557

原创 Eva and Euro coins(Gym-101981E)

Problem DescriptionEva is fond of collecting coins. Whenever she visits a different country, she always picks up as many localcoins as she can. As you know, Eva also likes to go trips to Europe; t...

2019-08-20 18:40:19 787

原创 Pyramid (Gym -01981G)

Problem DescriptionThe use of the triangle in the New Age practices seems to be very important as it represents the unholytrinity (Satan, the Antichrist and the False Prophet bringing mankind to t...

2019-08-20 18:21:04 311

原创 图论 —— 网络流 —— 费用流 —— zkw 费用流

【概述】求解费用流的方法很多,目前最流行的是 MCMF 费用流,其实质是将 EK 算法中的 bfs 换为了 SPFA 来计算最小费用,但其存在的一个缺点是 EK 是单路增广的,这样速度会相应的慢一些然后 zkw 神犇进行了改进,在 dfs 的时候实现多路增广,利用 KM 算法来代替 SPFA 算法来修改顶标,简单来说,其将 EK 费用流与 Dinic 费用流结合了起来。【算法原理】...

2019-08-20 10:43:57 1855

原创 Mindis(HDU-6670)

Problem Description平面上有n个矩形,矩形的边平行于坐标轴,现在度度熊需要操控一名角色从A点走到B点。该角色可以上下左右移动,在恰被k个矩形覆盖的区域,该角色的速率为k+1个距离/秒(矩形覆盖区域包括边界)。请求出A移动到 B 最快需要多少秒。Input第一行一个整数 T (1≤T≤5) 表示数据组数。对于每组数据,第一行输入一个整...

2019-08-20 10:27:33 668 2

原创 第K个幸运排列 (51Nod-1635)

题目比得喜欢幸运数字。这里所说的幸运数字是由4和7组成的正整数。比如,整数47,744,4是幸运数字,而5,17,467就不是。一天比得梦到由数字1到n组成的第K个字典序排列。要求计算在这个排列中有多少个幸运数所在的位置的编号也是幸运数。举例如下:比如排列[1,2,3,4],其中4为幸运数,它所在的位置的下标为4(幸运数),所在此排列中,结果为1.又如,[1,2,4,3],4...

2019-08-19 10:12:11 307

原创 Seq(HDU-6672)

Problem Description度度熊有一个递推式其中 a1=1。现给出 n,需要求 an。Input第一行输入一个整数T,代表T(1≤T≤100000) 组数据。接下T行,每行一个数字 n(1≤n≤1012)。Output输出 T 行,每行一个整数表示答案。Sample Input512345Sample Output1...

2019-08-19 09:56:04 206

原创 Game(HDU-6669)

Problem Description度度熊在玩一个好玩的游戏。游戏的主人公站在一根数轴上,他可以在数轴上任意移动,对于每次移动,他可以选择往左或往右走一格或两格。现在他要依次完成 n个任务,对于任务 i,只要他处于区间 [ai,bi] 上,就算完成了任务。度度熊想知道,为了完成所有的任务,最少需要移动多少次?度度熊可以任意选择初始位置。Input第一行一个整数 T...

2019-08-19 09:42:05 319

原创 Polynomial(HDU-6668)

Problem Description度度熊最近学习了多项式和极限的概念。现在他有两个多项式 f(x) 和 g(x),他想知道当 x 趋近无限大的时候,f(x)/g(x) 收敛于多少。Input第一行一个整数T(1≤T≤100)表示数据组数。对于每组数据,第一行一个整数 n(1≤n≤1,000) n−1表示多项式f 和g可能的最高项的次数(最高项系数不一定非...

2019-08-19 09:11:29 221

空空如也

空空如也

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

TA关注的人

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