自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

温文尔雅

我也想面向小姐姐编程

  • 博客(208)
  • 资源 (1)
  • 收藏
  • 关注

原创 codeforces 282 D. Yet Another Number Game

更好的阅读体验D. Yet Another Number Game开启传送门题目描述Since most contestants do not read this part, I have to repeat that Bitlandians are quite weird. They have their own jobs, their own working method, their own lives, their own sausages and their own games!Sin

2021-11-02 20:15:09 1071

原创 doraemon with latex

今天闲来无事想换个头像,然后就想到了A梦,遂用latex手画一副,录于此。\documentclass[border=12pt]{standalone}\usepackage{tikz}\definecolor{背景}{RGB}{223,236,255}\definecolor{A梦蓝}{RGB}{131,193,240}\definecolor{A梦红}{RGB}{245,98,114}\definecolor{红色}{RGB}{243,99,112}\begin{document}

2021-10-21 11:47:19 157

原创 树状数组-必知必会

更好的阅读体验定义首先参考维基百科的定义:A Fenwick tree or binary indexed tree is a data structure that can efficiently update elements and calculate prefix sums in a table of numbers.翻译过来就是:Fenwick树,或者说二叉索引树是一种能高效对一个数组,更新并计算前缀和的数据结构。所以根据定义来说,这个数据结构一定支持两种高效操作:更新操作,例

2021-10-11 20:19:15 124

原创 关于比赛中烦人的多组样例

更好的阅读体验打比赛的时候我们经常会遇到一些多组样例的情况,通常情况下我们都是这么做的:int t;cin>>t;while(t--) { solve();}但是很多时候我们并不需要知道 ttt 是多少,他在我们眼里就是个 无用 的变量,但是很多时候又不得不定义,就很烦。直到今天,我终于找到一个非常骚的操作,记录于此#include<bits/stdc++.h>using namespace std;struct MultiCase {

2021-09-28 14:57:09 87

原创 codeforces1574 D. The Strongest Build

本场比赛其他题目题解A. Regular Bracket SequencesB. Combinatorics HomeworkC. Slay the DragonD. The Strongest BuildD. The Strongest Build开启传送门题目描述Ivan is playing yet another roguelike computer game. He controls a single hero in the game. The hero has nnn equi

2021-09-27 21:15:23 233 2

原创 codeforces 1574 C. Slay the Dragon

本场比赛其他题目题解A. Regular Bracket SequencesB. Combinatorics HomeworkC. Slay the DragonD. The Strongest BuildC. Slay the Dragon开启传送门题目描述Recently, Petya learned about a new game “Slay the Dragon”. As the name suggests, the player will have to fight with

2021-09-27 21:12:46 393

原创 codefoces 1574 B. Combinatorics Homework

本场比赛其他题目题解A. Regular Bracket SequencesB. Combinatorics HomeworkC. Slay the DragonD. The Strongest BuildB. Combinatorics Homework开启传送门题目描述You are given four integer values aaa, bbb, ccc and mmm.Check if there exists a string that contains:aaa le

2021-09-27 21:10:33 83

原创 codeforces 1574 A. Regular Bracket Sequences

本场比赛其他题目题解A. Regular Bracket SequencesB. Combinatorics HomeworkC. Slay the DragonD. The Strongest BuildA. Regular Bracket Sequences开启传送门题目描述A bracket sequence is a string containing only characters “(” and “)”. A regular bracket sequence is a brac

2021-09-27 21:08:34 157

原创 project euler 463 A weird recurrence relation

更好的阅读体验problemsThe function fff is defined for all positive integers as follows:f(1)=1f(1)=1f(1)=1f(3)=3f(3)=3f(3)=3f(2n)=f(n)f(2n)=f(n)f(2n)=f(n)f(4n+1)=2f(2n+1)−f(n)f(4n + 1)=2f(2n + 1) - f(n)f(4n+1)=2f(2n+1)−f(n)f(4n+3)=3f(2n+1)−2f(n)f(4n + 3)=3

2021-09-17 17:24:45 73

原创 project euler 323

更好的阅读体验problemsLet y0,y1,y2y_0, y_1, y_2y0​,y1​,y2​,… be a sequence of random unsigned 323232 bit integers(i.e. 0≤yi<2320 \le y_i \lt 2^{32}0≤yi​<232, every value equally likely).For the sequence xi the following recursion is given:x0=0x_0 = 0x

2021-09-17 16:06:25 61

原创 project euler 315

更好的阅读体验problems[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-uj2jzAjx-1631859277324)(https://projecteuler.net/project/images/p315_clocks.gif)]Sam and Max are asked to transform two digital clocks into two “digital root” clocks.A digital root clock is a digita

2021-09-17 14:15:53 80

原创 codeforces 1567 E. Non-Decreasing Dilemma

本场比赛其他题目的题解A. Domino DisasterB. MEXor MixupC. Carrying ConundrumD. Expression Evaluation ErrorE. Non-Decreasing DilemmaE. Non-Decreasing Dilemma开启传送门题目描述Alice has recently received an array a1,a2,…,ana_1, a_2, \dots, a_na1​,a2​,…,an​ for her birt

2021-09-13 18:57:32 285

原创 codeforces 1567 D. Expression Evaluation Error

本场比赛其他题目的题解A. Domino DisasterB. MEXor MixupC. Carrying ConundrumD. Expression Evaluation ErrorE. Non-Decreasing DilemmaD. Expression Evaluation Error开启传送门题目描述On the board, Bob wrote nnn positive integers in base 101010 with sum sss (i. e. in deci

2021-09-13 18:55:56 165

原创 codeforces 1567 C. Carrying Conundrum

本场比赛其他题目的题解A. Domino DisasterB. MEXor MixupC. Carrying ConundrumD. Expression Evaluation ErrorE. Non-Decreasing DilemmaC. Carrying Conundrum开启传送门题目描述Alice has just learned addition. However, she hasn’t learned the concept of “carrying” fully — in

2021-09-13 18:54:50 185

原创 codeforces 1567 B. MEXor Mixup

本场比赛其他题目的题解A. Domino DisasterB. MEXor MixupC. Carrying ConundrumD. Expression Evaluation ErrorE. Non-Decreasing DilemmaB. MEXor Mixup开启传送门题目描述Alice gave Bob two integers aaa and bbb (a>0a > 0a>0 and b≥0b \ge 0b≥0). Being a curious boy, B

2021-09-13 18:53:16 293

原创 codeforces 1567 A. Domino Disaster

本场比赛其他题目的题解A. Domino DisasterB. MEXor MixupC. Carrying ConundrumD. Expression Evaluation ErrorE. Non-Decreasing DilemmaA. Domino Disaster开启传送门题目描述Alice has a grid with 222 rows and nnn columns. She fully covers the grid using nnn dominoes of size

2021-09-13 18:49:32 150

原创 codeforces 1559 E. Mocha and Stars

更好的阅读体验E. Mocha and Stars开启传送门题目描述Mocha wants to be an astrologer. There are nnn stars which can be seen in Zhijiang, and the brightness of the iii-th star is aia_iai​.Mocha considers that these nnn stars form a constellation, and she uses (a1,a2,…,a

2021-09-02 15:30:43 105

原创 Codeforces 1560 F2. Nearest Beautiful Number (hard version)

更好的阅读体验F2. Nearest Beautiful Number (hard version)开启传送门题目描述It is a complicated version of problem F1. The difference between them is the constraints (F1: k≤2k \le 2k≤2, F2: k≤10k \le 10k≤10).You are given an integer nnn. Find the minimum integer xxx

2021-08-29 15:14:46 113

原创 Codeforces 1562 D2. Two Hundred Twenty One (hard version)

本场比赛其他题目的题解A. The Miracle and the SleeperB. Scenes From a MemoryC. RingsD1. Two Hundred Twenty One (easy version)D2. Two Hundred Twenty One (hard version)D2. Two Hundred Twenty One (hard version)开启传送门题目描述This is the hard version of the problem. T

2021-08-28 21:39:26 128

原创 Codeforces 1562 D1. Two Hundred Twenty One (easy version)

本场比赛其他题目的题解A. The Miracle and the SleeperB. Scenes From a MemoryC. RingsD1. Two Hundred Twenty One (easy version)D1. Two Hundred Twenty One (easy version)开启传送门题目描述This is the easy version of the problem. The difference between the versions is that

2021-08-28 18:13:11 323 1

原创 Codeforces 1562 C. Rings

本场比赛其他题目的题解A. The Miracle and the SleeperB. Scenes From a MemoryC. RingsD1. Two Hundred Twenty One (easy version)C. Rings开启传送门题目描述Frodo was caught by Saruman. He tore a pouch from Frodo’s neck, shook out its contents —there was a pile of different

2021-08-28 18:11:17 196

原创 Codeforces 1562 B. Scenes From a Memory

本场比赛其他题目的题解A. The Miracle and the SleeperB. Scenes From a MemoryC. RingsD1. Two Hundred Twenty One (easy version)B. Scenes From a Memory开启传送门题目描述During the hypnosis session, Nicholas suddenly remembered a positive integer nnn, which doesn’t contai

2021-08-28 18:09:34 459

原创 codeforces 1562 A. The Miracle and the Sleeper

本场比赛其他题目的题解A. The Miracle and the SleeperB. Scenes From a MemoryC. RingsD1. Two Hundred Twenty One (easy version)A. The Miracle and the Sleeper开启传送门题目描述You are given two integers lll and rrr, l≤rl\le rl≤r. Find the largest possible value of a mod 

2021-08-28 18:07:26 334

原创 Codeforces 1458 B Glass Half Spilled

更好的阅读体验B. Glass Half Spilled开启传送门题目描述There are nnn glasses on the table numbered 1,…,n1, \ldots, n1,…,n. The glass iii can hold up to aia_iai​ units of water, and currently contains bib_ibi​ units of water.You would like to choose kkk glasses and col

2021-08-26 15:02:46 160

原创 Codeforces 1379 C Choosing flowers

更好的阅读体验C. Choosing flowers开启传送门题目描述Vladimir would like to prepare a present for his wife: they have an anniversary! He decided to buy her exactly nnn flowers.Vladimir went to a flower shop, and he was amazed to see that there are mmm types of flowers

2021-08-24 18:21:30 128

原创 Codeforces 1359 D Yet Another Yet Another Task

更好的阅读体验D. Yet Another Yet Another Task开启传送门题目描述Alice and Bob are playing yet another card game. This time the rules are the following. There are nnn cards lying in a row in front of them. The iii-th card has value aia_iai​.First, Alice chooses a non-e

2021-08-24 17:22:09 98

原创 本博客说明~

本博客永久停止更新,因为csdn的一些奇奇怪怪的原因,不想再在csdn上写了,如果对我的博客感兴趣的话,可以看这里

2019-03-21 17:04:09 273

原创 欧拉计划部分解题报告(76-80)

076 Counting summations (开启传送门)。题意:问你100能写成多少种求和方式。分析:记忆化搜索就行。然后稍微注意一下,他要求求和,也就是说100=100100=100100 = 100,这种是不算的。代码:#include &lt;bits/stdc++.h&gt;using namespace std;long long ans[105][105];...

2018-07-19 10:31:57 271

原创 欧拉计划部分解题报告(71-75)

071 Ordered fractions (开启传送门)。题意:问你xd,(d∈[1,1e6],x∈[1,d])xd,(d∈[1,1e6],x∈[1,d])\frac{x}{d},(d \in [1,1e6],x \in [1,d])中哪个分数小于3737\frac{3}{7}又最接近3737\frac{3}{7}。输出分子。分析:这个题其实可以直接分析出来。显然可以得到4285719...

2018-07-19 10:20:41 268

原创 欧拉计划部分解题报告(66-70)

069 Totient maximum (开启传送门)。题意:问你[1,1e6][1,1e6][1,1e6]范围内的所有nnn中哪个的n/φ(n)n/φ(n)n/\varphi(n)最大。分析:第一个做法就是直接弄出所有的φ(n)φ(n)\varphi(n),然后暴力枚举统计答案就行。代码:#include &lt;bits/stdc++.h&gt;using namespace...

2018-07-19 10:00:54 253

原创 欧拉计划部分解题报告(31-35)

031 Coin sums(开启传送门)。题意:问你,200200200,由任意多个1,2,5,10,20,50,100,2001,2,5,10,20,50,100,2001,2,5,10,20,50,100,200构成的方案数。分析:简单深搜,注意从大到小深搜,会稍微快一点。代码:#include &lt;bits/stdc++.h&gt;using namespace std...

2018-07-18 10:07:52 210

原创 欧拉计划部分解题报告(11-15)

015 Lattice paths (开启传送门)。题意:问你从左上到右下只能向右或者向下的路径条数。分析:显然是个组合数问题,也就是让你求C2040C4020C_{40}^{20}。代码:#include &amp;amp;amp;amp;amp;lt;bits/stdc++.h&amp;amp;amp;amp;amp;gt;using namespace std;long long ans[45][45];void init(){ fo...

2018-07-17 11:33:39 386

原创 欧拉计划部分题解报告(26-30)

026 Reciprocal cycles (开启传送门)。题意:问你1000以内的ddd,使得1/d1/d1/d的循环节最长。分析:直接模拟所有的数据的循环节,然后输出最长的就行了。代码:#include &amp;amp;amp;amp;amp;amp;amp;lt;bits/stdc++.h&amp;amp;amp;amp;amp;amp;amp;gt;using namespace std;bool ans[1005];int cal(int a){

2018-07-16 17:12:39 385

原创 欧拉计划部分题解报告(21-25)

021 Amicable numbers (开启传送门)。题意:让你找到所有符合d(d(n))==nd(d(n))==nd(d(n))==n &amp;amp;&amp;amp; d(n)≠nd(n)≠nd(n) \neq n的和。其中d(n)d(n)d(n)为nnn的除本身外所有的因子和。分析:直接求出每个数的因子和,然后判断就行。代码:#include&amp;lt;bits/stdc++.h&amp;gt;...

2018-07-16 17:10:27 440

原创 欧拉计划部分解题报告(16-20)

018 Maximum path sum I(开启传送门)。题意:找一条从第一层到最后一层的路径,使得路径上权值和最大。分析:简单dp。代码:#include&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;lt;bits/stdc++.h&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt;usi

2018-07-14 21:02:33 383

原创 数据结构大作业——基数排序

#include &lt;bits/stdc++.h&gt;using namespace std;const int MAX = 10;const int maxm = 1e5+10;int len;int num[maxm];void print(){///output the array that is sorted cout&lt;&lt;num[0]; for...

2018-06-26 11:04:51 500

原创 数据结构大作业——在一个字符矩阵中找到某个单词是否出现过

#include &amp;lt;bits/stdc++.h&amp;gt;#define change_read() freopen(&quot;C:\\Users\\Administrator\\Desktop\\in.txt&quot;,&quot;r&quot;,stdin)using namespace std;struct p{ const static int maxm = 1e3+10; char mat[max...

2018-06-11 11:37:39 916

原创 hdu 1520 Anniversary party

开启传送门。There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means that the supervisor relation fo...

2018-05-08 16:41:46 144

原创 记2018年第九届山东省赛

为期两天的山东省赛结束了。无论结果如何,首先还是要感谢一下山东财经大学提供的比赛平台和服务。先说一下整个过程吧,周六中午到达山东财经大学,开房,放东西,稍微休息了一下,吃了点东西准备热身赛。因为有些学弟没有用过PC2这个平台,所以队伍就索性打散了,然后我就被分到了一个学弟的队伍,其实还是有点慌的(万一我也忘了怎么用PC2,岂不是很尴尬?),热身开始,就看到我两个队友和那个和我互换队伍的学弟疯狂...

2018-05-07 18:52:06 227

原创 codeforces round#478D Ghosts

Open the transmission gate Ghosts live in harmony and peace, they travel the space without any purpose other than scare whoever stands in their way. There are n ghosts in the universe, they m...

2018-05-02 17:33:11 280

Gin 框架介绍(v1.7.1).pdf

关于gin框架的一些原理介绍,适合想了解API框架的同学查看

2021-09-28

空空如也

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

TA关注的人

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