自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Mitsuha_的博客

Rush to the dead summer

  • 博客(386)
  • 论坛 (1)

原创 Codeforces-1259F:Good Contest(DP)

F. Good Contesttime limit per test 3 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputAn online contest will soon be held on ForceCoders, a large competitive pr...

2020-01-30 21:22:27 348

原创 Codeforces-1284E:New Year and Castle Construction(计算几何)

E. New Year and Castle Constructiontime limit per test 3 secondsmemory limit per test 1024 megabytesinput standard inputoutput standard outputKiwon’s favorite video game is now holding a new year...

2020-01-08 00:24:58 255

原创 Codeforces-1297F:New Year and Handle Change(wqs二分)

F. New Year and Handle Changetime limit per test 3 secondsmemory limit per test 256 megabytesinputstandard inputoutputstandard outputNew Year is getting near. So it’s time to change handles on co...

2019-12-28 13:04:55 384 8

原创 2019-2020 ICPC Asia Jakarta Regional Contest

2019-2020 ICPC Asia Jakarta Regional ContestA.Copying Homework签到,b[i]=n+1−a[i]b[i]=n+1-a[i]b[i]=n+1−a[i]B. Cleaning Robots用d[i][j]用d[i][j]用d[i][j]表示在以iii为根节点的子树中,iii节点状态为jjj的方案数。j=0j=0j=0,表示iii是一...

2019-11-04 01:11:18 648

原创 2016湖南省省赛-K:盖房子(单调栈)

链接:https://ac.nowcoder.com/acm/contest/1112/K时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536KSpecial Judge, 64bit IO Format: %lld题目描述Bobo 在 ICPCCamp 买了一块 n×mn×mn×m 的土地,其中有些格子是障碍。他想选择两个矩形区域,建造两座房...

2019-10-09 13:06:03 96

原创 2017 ACM-ICPC Asia Urumqi

2017 ACM-ICPC Asia UrumqiA. Coins最优的策略一定是:当有至少 k 枚硬币面朝下时,则选 k 枚面朝下的硬币去抛掷(任意k 枚都可以);如果不足 k 枚面朝下,则在选择所有面朝下的硬币的基础上再额外选择若干面朝上的银币。于是有动态规划,记d[i][j]d[i][j]d[i][j]表示抛掷了iii次后,有jjj枚硬币面朝上的概率。他们应该满足d[i][0]+...

2019-06-23 01:43:06 721

原创 2019 计蒜之道 初赛 第四场:D. 腾讯益智小游戏—矩形面积交(困难)

腾讯游戏开发了一款全新的编程类益智小游戏,最新推出的一个小游戏题目是关于矩形面积交的。聪明的你能解出来吗?看下面的题目接招吧。给定二维平面上 n 个与坐标轴平行的矩形,每个矩形是形如 {(x,y)∣x,y∈R,x1≤x≤x2,y1≤y≤y2}\lbrace (x,y) | x,y \in R, x_1 \le x \le x_2, y_1 \le y \le y_2\rbrace{(x,y)∣x...

2019-06-04 14:26:12 179

原创 hicocoder#1965 : 生存游戏(优先队列)

时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi在玩一款生存游戏。他需要在游戏中成功活过N个夜晚才能通关。而每一天的夜晚都会有僵尸攻击,其中第i天的攻击会消耗Ai个生存物资。换句话说,如果在第i天的夜晚小Hi剩余的生存物资少于Ai个,游戏就会失败。获得生存物资的唯一方式是从商人NPC处购买。每一天白天商人都会出售M个生存物资(前一天没卖出的物资不会再卖)。不过...

2019-05-29 19:52:52 114

原创 华南理工大学“三七互娱杯”程序设计竞赛-B: HRY and fibonacci(线段树+矩阵快速幂)

链接:https://ac.nowcoder.com/acm/contest/874/B时间限制:C/C++ 5秒,其他语言10秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述HRY is a pupil. He has just learned about Fibonacci sequence recently, and ...

2019-04-28 14:18:53 91

原创 Codeforces-1152F:Neko Rules the Catniverse(DP+矩阵快速幂)

F2. Neko Rules the Catniverse (Large Version)time limit per test 7 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputThis problem is same as the previous one, bu...

2019-04-26 00:25:57 171

原创 Codeforces-1151F:Sonya and Informatics(DP+矩阵快速幂)

F. Sonya and Informaticstime limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputA girl named Sonya is studying in the scientific lyceum of the Kin...

2019-04-19 11:09:57 132

原创 Codeforces-1153D:Serval and Rooted Tree(DP)

D. Serval and Rooted Treetime limit per test 2 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputNow Serval is a junior high school student in Japari Middle Scho...

2019-04-16 17:19:43 479

原创 hicocoder#1933 : 最短管道距离2(DP+斜率优化)

时间限制:10000ms单点时限:1000ms内存限制:256MB描述在一张2D地图上有N座城市,坐标依次是(X1, Y1), (X2, Y2), … (XN, YN)。现在H国要修建K条平行于X轴的天然气主管道。这些管道非常长,可以认为是一条条平行于X轴的直线。小Ho想知道如何修建这K条管道,可以使N座城市到最近的管道的垂直距离之和最小。请你求出这个最小的距离之和。输入第一行包含...

2019-02-24 16:21:43 345

原创 Codeforces-1131D:Gourmet choice(拓扑+并查集)

D. Gourmet choicetime limit per test 2 secondsmemory limit per test 256 megabytesinputstandard inputoutputstandard outputMr. Apple, a gourmet, works as editor-in-chief of a gastronomic periodical...

2019-02-24 11:30:29 484

原创 Codeforces-1117E:Decypher the String(思维)

E. Decypher the Stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis is an interactive problem. Remember to flush your output while com...

2019-02-20 14:14:47 268

原创 Codeforces-gym/101853G:Hard Equation(BSGS)

G. Hard Equationtime limit per test 10.0 smemory limit per test 256 MBinputs tandard inputoutputs tandard outputConsider the following equationax≡bmodma^x\equiv b\quad mod\quad max≡bmodmGiven a, ...

2019-02-15 16:21:04 282

原创 Codeforces-1114F:Please, another Queries on Array?(线段树)

F. Please, another Queries on Array?time limit per test 5.5 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputYou are given an array a1,a2,…,an.a_1,a_2,…,a_n.a1​...

2019-02-12 19:35:34 261

原创 Codeforces-1106F:Lunar New Year and a Recursive Sequence(矩阵快速幂+BSGS)

F. Lunar New Year and a Recursive Sequencetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLunar New Year is approaching, and Bob received a g...

2019-02-05 13:51:20 450

原创 Codeforces-1106E:Lunar New Year and Red Envelopes(DP+优先队列)

E. Lunar New Year and Red Envelopestime limit per test 3 secondsmemory limit per test 256 megabytesinput standard inputoutput standard outputLunar New Year is approaching, and Bob is going to rec...

2019-02-01 12:54:45 914

原创 Codeforces-1062F:Upgrading Cities(拓扑排序)

F. Upgrading Citiestime limit per test 2 secondsmemory limit per test 256 megabytesinputstandard inputoutputstandard outputThere are n cities in the kingdom X, numbered from 1 through n. People t...

2019-01-30 21:54:42 159

原创 WUST OJ 1270:LIS(数位DP)

1270: LISTime Limit: 1 SecMemory Limit: 128 MB 64bit IO Format: %lldDescription给三个整数L,R,K。求闭区间[L,R]内有多少个数A,使得如果把A当成字符串时,它的最长严格递增子序列长度为K,比如12324的最长严格递增子序列长度为4。Input多组测试样例。每组含三个整数L,R,K.占一行。(0&...

2019-01-28 12:08:47 165 4

原创 ZOJ-4082:Little Sub and his Geometry Problem(二分+BIT)

题目链接思路:对于每个询问来说,每一个uuu,只存在一个vvv使得F(u,v)=CiF(u,v)=C_iF(u,v)=Ci​。那么提前将点按xxx坐标排好序,枚举uuu,将x≤ux\le ux≤u的点放入BIT,用树状数组记录点的个数及x+yx+yx+y的值,然后二分vvv。二分时用树状数组计算F(u,v)F(u,v)F(u,v)。PS:当Ci>2∗1010C_i&g...

2019-01-19 17:39:52 308 8

原创 Codeforces-1100D:Dasha and Chess(思维)

D. Dasha and Chesstime limit per test 2 secondsmemory limit per test 256 megabytesinputstandard inputoutputstandard outputThis is an interactive task.Dasha and NN like playing chess. While playi...

2019-01-14 20:54:42 234 3

原创 Codeforces-1100E:Andrew and Taxi(二分+拓扑排序)

E. Andrew and Taxitime limit per test 2 secondsmemory limit per test 256 megabytesinputstandard inputoutputstandard outputAndrew prefers taxi to other means of transport, but recently most taxi d...

2019-01-14 19:07:12 601

原创 牛客练习赛36-C: Rabbit的工作(2)(快速幂优化DP)

链接:https://ac.nowcoder.com/acm/contest/328/C时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述Rabbit通过了上次boss的考核,现在她又遇到了一个问题。Rabbit接到了K个任务,每个任务她可以自由选择用i天去完成(1≤i≤N)(1≤ i≤ N...

2019-01-13 12:06:19 111

原创 2018-2019 ACM-ICPC, Asia East Continent Finals

Problem F:Interstellar … Fantasy思路:将S,T,O投影到一个二维平面上计算,还要判断ST是否与圆O相交。#include<bits/stdc++.h>using namespace std;const int MAX=1e5+10;const int MOD=1e9+7;const double PI=acos(-1.0);t

2019-01-08 21:26:53 1428

原创 牛客练习赛36-F:Rabbit的蛋糕(计算几何)

链接:https://ac.nowcoder.com/acm/contest/328/F时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536KSpecial Judge, 64bit IO Format: %lld题目描述Rabbit和xxx获得了一个很大的蛋糕,这个蛋糕实际上是由N个点组成的凸多边形(点从1到N编号,保证没有三点共线)。接着两...

2019-01-05 18:16:44 139

原创 Codeforces-1097D:Makoto and a Blackboard(期望+DP)

D. Makoto and a Blackboardtime limit per test 2 secondsmemory limit per test 256 megabytesinputstandard inputoutputstandard outputMakoto has a big blackboard with a positive integer n written on ...

2019-01-05 13:41:20 366

原创 Codeforces-1096G:Lucky Tickets(NTT)

G. Lucky Ticketstime limit per test 5 secondsmemory limit per test 256 megabytesinputstandard inputoutputstandard outputAll bus tickets in Berland have their numbers. A number consists of n digit...

2018-12-30 13:32:09 352

原创 Codeforces-1088D:Ehab and another another xor problem(思维)

D. Ehab and another another xor problemtime limit per test 1 secondmemory limit per test 256 megabytesinputstandard inputoutputstandard outputThis is an interactive problem!Ehab plays a game wit...

2018-12-05 11:42:42 344

原创 2018-2019 ACM-ICPC, Asia Xuzhou Regional Contest-M:Rikka with Illuminations(计算几何)

M. Rikka with Illuminationstime limit per test 8.0 smemory limit per test 1024 MBinputstandard inputoutputstandard outputRikka loves convex polygons, so she decides to install some illuminants to...

2018-12-04 16:21:06 799

原创 2018-2019 ICPC, NEERC, Northern Eurasia Finals(F,K)

2018-2019 ICPC, NEERC, Northern Eurasia FinalsProblem F:Fractions思路:看懂题意之后,相当于求解x1n+x2n+x3n+⋯+xkn=n−1n\frac {x_1}{n}+\frac {x_2}{n}+\frac {x_3}{n}+\dots +\frac {x_k}{n}=\frac {n-1}{n}nx1​​+nx2​​+nx3...

2018-12-03 13:56:01 646

原创 2018 ACM-ICPC Syrian Collegiate Programming Contest(部分题解,待补)

传送门2018 ACM-ICPC 叙利亚大学生程序设计竞赛Problem A: Hello SCPC 2018!签到题Problem B: Binary Hamming简单题#include<bits/stdc++.h>using namespace std;const int MAX=1e6+10;const int

2018-11-25 00:03:39 1140

原创 2018-2019 ACM-ICPC, Asia Nanjing-D: Country Meow(三分)

Problem D. Country MeowInput file: standard inputOutput file: standard outputIn the 24th century, there is a country somewhere in the universe, namely Country Meow. Due to advanced technology, peop...

2018-11-17 21:50:12 704

原创 Codeforces-1062E:Company(LCA+线段树)

E. Companytime limit per test 2 secondsmemory limit per test 256 megabytesinputstandard inputoutputstandard outputThe company X has n employees numbered from 1 through n. Each employee u has a di...

2018-11-17 20:28:37 236

原创 Codeforces-1077F:Pictures with Kittens(DP+单调队列优化)

F2. Pictures with Kittens (hard version)time limit per test 2.5 secondsmemory limit per test 512 megabytesinputstandard inputoutputstandard outputThe only difference between easy and hard version...

2018-11-17 15:36:45 507

原创 2017-2018 ACM-ICPC, Asia Tsukuba Regional Contest(部分题解)

传送门Problem A:Secret of Chocolate Poles思路:简单dp。d[i][0/1]d[i][0/1]d[i][0/1]表示高度为i时,顶层圆盘是0/1颜色时的方案数。#include<bits/stdc++.h&amp

2018-11-16 13:37:09 771 2

原创 Codeforces-1076E:Vasya and a Tree(树状数组)

E. Vasya and a Treetime limit per test 2 secondsmemory limit per test 256 megabytesinputstandard inputoutputstandard outputVasya has a tree consisting of n vertices with root in vertex 1. At firs...

2018-11-13 13:14:42 166

原创 Lyft Level 5 Challenge 2018 - Final Round:F. Deduction Queries(带权并查集)

F. Deduction Queriestime limit per test 2 secondsmemory limit per test 256 megabytesinputstandard inputoutputstandard outputThere is an array a of 2302^{30}230 integers, indexed from 0 to 230−12^...

2018-11-09 11:27:20 124

原创 Codeforces-1070E:Getting Deals Done(二分)

传送门思路:完成的任务数量越多,花的时间也越多,二分完成的任务数量,那么如何确定d呢?因为确定了完成任务的数量cnt,那么肯定是选前cnt小的pip_ipi​来完成,这样花费的时间相对也会少点,那么就确定d为第cnt小的pip_ipi​。#include<bits/stdc++.h>using namespace std;const int MAX=2e5+10;typed...

2018-11-02 16:35:42 295

空空如也

Mitsuha_的留言板

发表于 2020-01-02 最后回复 2020-01-02

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