自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(94)
  • 资源 (2)
  • 收藏
  • 关注

原创 [蓝桥杯][2017年第八届真题]小数第n位(数学)

题目描述我们知道,整数做除法时,有时得到有限小数,有时得到无限循环小数。如果我们把有限小数的末尾加上无限多个0,它们就有了统一的形式。本题的任务是:在上面的约定下,求整数除法小数点后的第n位开始的3位数。输入一行三个整数:a b n,用空格分开。a是被除数,b是除数,n是所求的小数后位置(0<a,b,n<1000000000)输出一行3位数字,表示:a除以b,小数后第n位...

2020-04-30 20:55:27 995 1

原创 [蓝桥杯][2017年第八届真题]拉马车(String)

题目描述小的时候,你玩过纸牌游戏吗?有一种叫做“拉马车”的游戏,规则很简单,却很吸引小朋友。其规则简述如下:假设参加游戏的小朋友是A和B,游戏开始的时候,他们得到的随机的纸牌序列如下:A方:[K, 8, X, K, A, 2, A, 9, 5, A]B方:[2, 7, K, 5, J, 5, Q, 6, K, 4]其中的X表示“10”,我们忽略了纸牌的花色。从A方开始,A、B双方轮...

2020-04-30 18:50:24 449

原创 [蓝桥杯][2017年第八届真题]分考场(dfs+剪枝)

题目描述n个人参加某项特殊考试。为了公平,要求任何两个认识的人不能分在同一个考场。求是少需要分几个考场才能满足条件。输入第一行,一个整数n(1<n<100),表示参加考试的人数。第二行,一个整数m,表示接下来有m行数据以下m行每行的格式为:两个整数a,b,用空格分开 (1<=a,b<=n) 表示第a个人与第b个人认识。输出一行一个整数,表示最少分几个考场。...

2020-04-30 08:53:59 773

原创 [蓝桥杯][基础练习VIP]完美的代价(贪心)

题目描述回文串,是一种特殊的字符串,它从左往右读和从右往左读是一样的。小龙龙认为回文串才是完美的。现在给你一个串,它不一定是回文的,请你计算最少的交换次数使得该串变成一个完美的回文串。交换的定义是:交换两个相邻的字符例如mamad第一次交换 ad : mamda第二次交换 md : madma第三次交换 ma : madam (回文!完美!)输入第一行是一个整数...

2020-04-28 21:26:35 417

原创 Garland CodeForces - 767C(思维)

Once at New Year Dima had a dream in which he was presented a fairy garland. A garland is a set of lamps, some pairs of which are connected by wires. Dima remembered that each two lamps in the garland...

2020-04-28 20:12:30 404

原创 Distance in Tree CodeForces - 161D(树形dp)

A tree is a connected graph that doesn’t contain any cycles.The distance between two vertices of a tree is the length (in edges) of the shortest path between these vertices.You are given a tree with...

2020-04-28 14:38:10 314

原创 Multiple Testcases CodeForces - 1342D(贪心+树状数组)

So you decided to hold a contest on Codeforces. You prepared the problems: statements, solutions, checkers, validators, tests… Suddenly, your coordinator asks you to change all your tests to multiple ...

2020-04-27 21:34:22 269

原创 Yet Another Counting Problem CodeForces - 1342C(规律+前缀和)

You are given two integers a and b, and q queries. The i-th query consists of two numbers li and ri, and the answer to it is the number of integers x such that li≤x≤ri, and ((xmoda)modb)≠((xmodb)moda)...

2020-04-27 18:17:54 661

原创 Educational Codeforces Round 86 (Rated for Div. 2)(A&&B)

Road To Zero CodeForces - 1342AYou are given two integers x and y. You can perform two types of operations:Pay a dollars and increase or decrease any of these integers by 1. For example, if x=0 and ...

2020-04-27 17:30:19 592

原创 Ayoub and Lost Array CodeForces - 1105C(计数dp)

Ayoub had an array a of integers of size n and this array had two interesting properties:All the integers in the array were between l and r (inclusive).The sum of all the elements was divisible by 3...

2020-04-27 09:29:50 426

原创 Tree2cycle HDU - 4714(贪心)

A tree with N nodes and N-1 edges is given. To connect or disconnect one edge, we need 1 unit of cost respectively. The nodes are labeled from 1 to N. Your job is to transform the tree to a cycle(with...

2020-04-26 18:44:28 234

原创 Appleman and Tree CodeForces - 461B(树形dp)

Appleman has a tree with n vertices. Some of the vertices (at least one) are colored black and other vertices are colored white.Consider a set consisting of k (0 ≤ k < n) edges of Appleman’s tree....

2020-04-26 16:40:07 216

原创 Perfect Service UVA - 1218(树形dp)

A network is composed of N computers connected by N − 1 communication links such that any twocomputers can be communicated via a unique route. Two computers are said to be adjacent if there isa comm...

2020-04-25 19:17:48 247 1

原创 Nastya and Scoreboard CodeForces - 1341D(DFS+剪枝)

Denis, who managed to buy flowers and sweets (you will learn about this story in the next task), went to a meeting with Nastya to invite her to become a couple. And so, they sit together in a cafe, ch...

2020-04-24 17:56:18 556

原创 Nastya and Strange Generator CodeForces - 1341C(思维+并查集)

Being upset after this behavior of Nastya, Denis was very sad. Nothing could make the rejected guy happier. To at least somehow have fun, he decided to walk through the gateways. And, luck smiled at h...

2020-04-24 15:55:01 574

原创 Nastya and Door CodeForces - 1341B

On February 14, Denis decided to give a Valentine to Nastya and did not come up with anything better than to draw a huge red heart on the door of the length k (k≥3). Nastya was very confused by this p...

2020-04-24 12:58:14 822 3

原创 Restore the Permutation by Sorted Segments CodeForces - 1343F(暴力+Set+Vector)

We guessed a permutation p consisting of n integers. The permutation of length n is the array of length n where each element from 1 to n appears exactly once. This permutation is a secret for you.For...

2020-04-23 19:45:11 397

原创 Weights Distributing CodeForces - 1343E(思维+最短路)

You are given an undirected unweighted graph consisting of n vertices and m edges (which represents the map of Bertown) and the array of prices p of length m. It is guaranteed that there is a path bet...

2020-04-23 10:18:14 372

原创 Codeforces Round #636 (Div. 3)(A&&B&&C)

A. Candies水题,暴力即可代码如下:#include<bits/stdc++.h>#define ll long longusing namespace std;int n;int main(){ int t; scanf("%d",&t); while(t--) { scanf("%d",&n); int sum=0; ...

2020-04-22 21:44:11 192

原创 Constant Palindrome Sum CodeForces - 1343D(树状数组)

You are given an array a consisting of n integers (it is guaranteed that n is even, i.e. divisible by 2). All ai does not exceed some integer k.Your task is to replace the minimum number of elements ...

2020-04-22 21:33:53 381

原创 Party at Hali-Bula UVA - 1220(树形dp)

题目链接:传送门思路:求最多参与人数是树形dp的入门题,和没有上司的舞会是一个题目,但是这个题目还要求答案是否唯一。我们开设一个标记数组vis,标记就可以了。具体解释看代码:#include<bits/stdc++.h>#define ll long longusing namespace std;const int maxx=2e2+100;struct edge{ ...

2020-04-21 21:18:22 159

原创 Another Crisis UVA - 12186(树形dp)

A couple of years ago, a new world wide crisis started, leaving many people with economical problems.Some workers of a particular company are trying to ask for an increase in their salaries.The comp...

2020-04-21 19:38:28 216

原创 Balancing Act POJ - 1655(树形dp)

Consider a tree T with N (1 <= N <= 20,000) nodes numbered 1…N. Deleting any node from the tree yields a forest: a collection of one or more trees. Define the balance of a node to be the size of...

2020-04-21 12:04:42 244

原创 [蓝桥杯][算法提高VIP]密码锁(BFS)

题目描述你获得了一个据说是古代玛雅人制作的箱子。你非常想打开箱子看看里面有什么东西,但是不幸的是,正如所有故事里一样,神秘的箱子出现的时候总是会挂着神秘的锁。这个锁上面看起来有 N 个数字,它们排成一排,并且每个数字都在 0 到 2 之间。你发现你可以通过锁上的机关来交换相邻两个数字的顺序。比如,如果原来有 5 个数字 02120,在一次交换以后你就可以得到 20120,0...

2020-04-20 15:30:17 710

原创 [蓝桥杯][算法提高VIP]项链(dfs)

题目描述由 n(1≤n≤100)  个珠子组成的一个项链,珠子有红、蓝、白三种颜色,各种颜色的珠子的安排顺序由键盘输入的字符串任意给定。蓝色用小写字母b表示,红色用小写字母r表示,  白色用小写字母w表示.假定从项链的某处将其剪断,把它摆成一条直线。先从左端向右收集同色珠子,遇到第一个异色珠子时停止.  收集过程中, 白色是一种特殊颜色, 既可以看成红色也可以看成蓝色。然后再从剩余珠子的...

2020-04-20 15:09:28 635

原创 蓝桥杯省内模拟赛解题过程

今天参加了一场蓝桥杯模拟赛,做的咋样还不知道,本博客的题解只是我提交的代码,并不代表真正的题解,大家参考着看看吧。题目一问题描述  将LANQIAO中的字母重新排列,可以得到不同的单词,如LANQIAO、AAILNOQ等,注意这7个字母都要被用上,单词不一定有具体的英文意义。  请问,总共能排列如多少个不同的单词。答案提交  这是一道结果填空的题,你只需要算出结果后提交即可。本题的结果...

2020-04-19 19:33:18 1359

原创 Circle of Monsters CodeForces - 1334C(前缀和+贪心)

You are playing another computer game, and now you have to slay n monsters. These monsters are standing in a circle, numbered clockwise from 1 to n. Initially, the i-th monster has ai health.You may ...

2020-04-18 20:07:35 589

原创 Xenia and Colorful Gems CodeForces - 1337D(数学+二分)

Xenia is a girl being born a noble. Due to the inflexibility and harshness of her family, Xenia has to find some ways to amuse herself.Recently Xenia has bought nr red gems, ng green gems and nb blue...

2020-04-18 15:55:27 625

原创 Linova and Kingdom CodeForces - 1337C(贪心+排序)

Writing light novels is the most important thing in Linova’s life. Last night, Linova dreamed about a fantastic kingdom. She began to write a light novel for the kingdom as soon as she woke up, and of...

2020-04-17 18:25:20 532

原创 [蓝桥杯][算法训练VIP]摆动序列(深搜+回溯||动态规划)

题目描述如果一个序列满足下面的性质,我们就将它称为摆动序列:序列中的所有数都是不大于k的正整数;序列中至少有两个数。序列中的数两两不相等;如果第i – 1个数比第i – 2个数大,则第i个数比第i – 2个数小;如果第i – 1个数比第i – 2个数小,则第i个数比第i – 2个数大。比如,当k = 3时,有下面几个这样的序列:1 21 32 ...

2020-04-17 11:07:01 689

原创 [蓝桥杯][2016年第七届真题]路径之谜(dfs+回溯)

题目描述小明冒充X星球的骑士,进入了一个奇怪的城堡。城堡里边什么都没有,只有方形石头铺成的地面。假设城堡地面是 n x n 个方格。【如图1.png】所示。按习俗,骑士要从西北角走到东南角。可以横向或纵向移动,但不能斜着走,也不能跳跃。每走到一个新方格,就要向正北方和正西方各射一箭。(城堡的西墙和北墙内各有 n 个靶子)同一个方格只允许经过一次。但不必走完所有的方格。如果只给出靶...

2020-04-17 09:11:34 405

原创 [蓝桥杯][历届试题]蚂蚁感冒(模拟)

题目描述长100厘米的细长直杆子上有n只蚂蚁。它们的头有的朝左,有的朝右。每只蚂蚁都只能沿着杆子向前爬,速度是1厘米/秒。当两只蚂蚁碰面时,它们会同时掉头往相反的方向爬行。这些蚂蚁中,有1只蚂蚁感冒了。并且在和其它蚂蚁碰面时,会把感冒传染给碰到的蚂蚁。请你计算,当所有蚂蚁都爬离杆子时,有多少只蚂蚁患上了感冒。输入第一行输入一个整数n (1 < n < 50)...

2020-04-16 19:00:16 209

原创 Computer HDU - 2196(树形dp)

A school bought the first computer some time ago(so this computer’s id is 1). During the recent years the school bought N-1 new computers. Each new computer was connected to one of settled earlier. Ma...

2020-04-16 18:00:43 212

原创 Robots on a Grid CodeForces - 1335F(拓扑排序+正反建图+判环)

There is a rectangular grid of size n×m. Each cell of the grid is colored black (‘0’) or white (‘1’). The color of the cell (i,j) is ci,j. You are also given a map of directions: for each cell, there ...

2020-04-16 13:57:00 664

原创 Three Blocks Palindrome (hard version) CodeForces - 1335E2(暴力+二分)

The only difference between easy and hard versions is constraints.You are given a sequence a consisting of n positive integers.Let’s define a three blocks palindrome as the sequence, consisting of a...

2020-04-15 18:39:42 372

原创 Three Blocks Palindrome (easy version) CodeForces - 1335E1(暴力+二分)

The only difference between easy and hard versions is constraints.You are given a sequence a consisting of n positive integers.Let’s define a three blocks palindrome as the sequence, consisting of a...

2020-04-15 18:31:54 608

原创 Anti-Sudoku CodeForces - 1335D(思维)

You are given a correct solution of the sudoku puzzle. If you don’t know what is the sudoku, you can read about it here.The picture showing the correct sudoku solution:Blocks are bordered with bold...

2020-04-15 10:15:42 435

原创 Two Teams Composing CodeForces - 1335C(思维)

You have n students under your control and you have to compose exactly two teams consisting of some subset of your students. Each student had his own skill, the i-th student skill is denoted by an int...

2020-04-15 10:10:39 920 6

原创 Codeforces Round #634 (Div. 3)部分题解(A&&B)

Candies and Two Sisters CodeForces - 1335AThere are two sisters Alice and Betty. You have n candies. You want to distribute these n candies between two sisters in such a way that:Alice will get a (a...

2020-04-15 10:07:03 385

原创 Edge Weight Assignment CodeForces - 1339D(思维+贪心)

You have unweighted tree of n vertices. You have to assign a positive weight to each edge so that the following condition would hold:For every two different leaves v1 and v2 of this tree, bitwise XOR...

2020-04-14 10:24:42 549

Chinese_Mnist数据集

众所周知,Mnist数据集是深度学习入门所需的数据集,但是Chinese_Mnist数据集可以作为前者的补充,在熟悉Mnist数据集后可以用来练手

2021-09-05

ch_photos.7z

一共13636张图片,适用于一般的车牌识别项目、课设、毕设等,内附有利用CNN实现车牌识别的模型可供大家参考

2021-09-05

空空如也

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

TA关注的人

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