
模拟
文章平均质量分 77
模拟
ShadyPi
写写博客当笔记
展开
-
[NeetCode 150] Rotate Matrix
【代码】[NeetCode 150] Rotate Matrix。原创 2024-07-17 00:32:53 · 873 阅读 · 0 评论 -
[NeetCode 150] Is Palindrome
【代码】[NeetCode 150] Is Palindrome。原创 2024-07-12 23:50:06 · 444 阅读 · 0 评论 -
[NeetCode 150] Valid Sudoku
【代码】[NeetCode 150] Valid Sudoku。原创 2024-07-12 22:28:13 · 420 阅读 · 0 评论 -
[NeetCode 150] Products of Array Discluding Self
Products of Array Discluding Self原创 2024-07-12 22:04:21 · 387 阅读 · 0 评论 -
书店管理系统(C++初学者友好版)
文章目录写在前面题目要求主体思路代码实现定义结构体book读入带空格字符串的函数通过书名查找书的编号进货函数出货函数查询某书的详细信息、销售情况、库存函数查询详细信息函数查询销售情况函数查询库存函数查询进/出货记录函数排序函数其他函数输出带空格字符串函数输出一本书的详细信息函数输出操作列表函数完整代码结语写在前面正如标题所示,本文是写给C++的初学者的一个书店管理系统实例。为了贴近目标读者的需求,本篇博客中的代码仅采用了初级的内容。比如:对于书的名字,采取了最简单粗暴的多维字符串存储而不是Trie树甚或原创 2020-12-22 16:03:48 · 2850 阅读 · 0 评论 -
CF1399D Binary String To Subsequences
原题链接:http://codeforces.com/problemset/problem/1399/DBinary String To SubsequencesYou are given a binary string s consisting of n zeros and ones.Your task is to divide the given string into the minimum number of subsequences in such a way that each char原创 2020-08-25 22:23:36 · 279 阅读 · 0 评论 -
CF1399E1 Weights Division (easy version)
原文链接:http://codeforces.com/problemset/problem/1399/E1Weights Division (easy version)Easy and hard versions are actually different problems, so we advise you to read both statements carefully.You are given a weighted rooted tree, vertex 1 is the root of原创 2020-08-28 23:35:41 · 308 阅读 · 0 评论 -
[2018.11.03 T4] 7w523
7w523题目描述你玩过7王523吗?这个扑克牌游戏可以 2~5 个人玩,最开始的时候,每人 555 张牌,庄家 666 张牌。庄家首先出牌,然后轮流出牌或不出牌。第一个出牌的人可以打出任意牌,后面的人必须比前面的牌大才能出牌,且牌型必须要和前面人出牌的牌型一致或大于前面人的牌型。牌的大小关系是 7>大王>小王>5>2>3>A>K>Q>...原创 2018-11-05 18:03:27 · 869 阅读 · 0 评论 -
[2018.10.15 T2] 字符串
暂无连接字符串【题目描述】小C学会了SASASA和SAMSAMSAM之后,非常激动。他看见了两个字符串s,ts,ts,t,其中sss只包含小写字母以及∗*∗,ttt只包含小写字母。小C可以进行任意多次操作,每次选择sss中的一个∗*∗,将它修改为任意多个(可以是000个)它的前一个字符。他想知道是否能将sss修改为ttt。请你帮小C求解这道简单字符串题。有多组数据。【输入】第一...原创 2018-10-16 09:41:56 · 240 阅读 · 0 评论 -
LOJ2420「NOIP2015」神奇的幻方
原题链接:https://loj.ac/problem/2420神奇的幻方题目描述幻方是一种很神奇的$ N \times N $ 矩阵:它由数字 1,2,3,…,N×N1,2,3, \ldots ,N \times N1,2,3,…,N×N构成,且每行、每列及两条对角线上的数字之和都相同。当 NNN为奇数时,我们可以通过以下方法构建一个幻方:首先将 111 写在第一行的中间。之后,按...原创 2018-10-08 15:08:32 · 321 阅读 · 0 评论 -
CF991C Candies
原题链接:http://codeforces.com/contest/991/problem/CCandiesAfter passing a test, Vasya got himself a box of nnn candies. He decided to eat an equal amount of candies each morning until there are no ...原创 2018-09-11 11:06:46 · 689 阅读 · 0 评论 -
CF984B Minesweeper
原题链接:http://codeforces.com/contest/984/problem/BMinesweeperOne day Alex decided to remember childhood when computers were not too powerful and lots of people played only default games. Alex enjo...原创 2018-09-13 10:51:44 · 294 阅读 · 0 评论 -
CF1042C Array Product
原题链接:http://codeforces.com/contest/1042/problem/CArray ProductYou are given an array aaa consisting of nnn integers. You can perform the following operations with it:Choose some positions iii and...原创 2018-09-18 09:38:09 · 347 阅读 · 0 评论 -
ARC098E Range Minimum Queries
原题链接:https://arc098.contest.atcoder.jp/tasks/arc098_cRange Minimum QueriesProblem StatementYou are given an integer sequence A of length N and an integer K. You will perform the following ...原创 2018-06-16 22:24:08 · 455 阅读 · 0 评论 -
Luogu4712「生物」能量流动
原题链接:https://www.luogu.org/problemnew/show/P4712「生物」能量流动继续水我的博客。。。因为我们啥都能吃,所以能量的流动对我们来说是不必要的,只需要养活其他动物,尽量减少能量损失即可。看起来还是有点难???冷静观察一下:ri≤ri+1(1≤i<n),ri<i(1≤i≤n)ri≤ri+1(1≤i<n),ri...原创 2018-06-21 23:42:42 · 364 阅读 · 0 评论 -
Luogu4711「化学」相对分子质量
原题链接:https://www.luogu.org/problemnew/show/P4711「化学」相对分子质量题目过水,题面过长不想搬运系列。。。darkdarkdark♂模拟即可ACAC\mathcal{AC}:先打表,元素最多两个字符,第一个大写,第二个小写,遇到大写直接特判下一个。下划线+花括号的格式也很单一,很容易判断,用快读把花括号里的数读出来即可。由于...原创 2018-06-21 23:22:10 · 742 阅读 · 0 评论