
模拟题
文章平均质量分 86
martinue
攻城狮
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
cf(打磨你)(大模拟)
D. Three Logos time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Three companies decided to order a billboard原创 2015-11-10 19:30:37 · 541 阅读 · 0 评论 -
leetcode 8
实现 atoi,将字符串转为整数。 该函数首先根据需要丢弃任意多的空格字符,直到找到第一个非空格字符为止。如果第一个非空字符是正号或负号,选取该符号,并将其与后面尽可能多的连续的数字组合起来,这部分字符即为整数的值。如果第一个非空字符是数字,则直接将其与之后连续的数字字符组合起来,形成整数。 字符串可以在形成整数的字符后面包括多余的字符,这些字符可以被忽略,它们对于函数没有影响。 当字符串中...原创 2018-09-27 23:31:46 · 212 阅读 · 0 评论 -
leetcode 6
将字符串 "PAYPALISHIRING" 以Z字形排列成给定的行数: P A H N A P L S I I G Y I R 之后从左往右,逐行读取字符:"PAHNAPLSIIGYIR" 实现一个将字符串进行指定行数变换的函数: string convert(string s, int numRows); 示例 1: 输入: s = "PAYPALISHI...原创 2018-09-27 01:13:54 · 169 阅读 · 0 评论 -
leetcode 2
给定两个非空链表来表示两个非负整数。位数按照逆序方式存储,它们的每个节点只存储单个数字。将两数相加返回一个新的链表。 你可以假设除了数字 0 之外,这两个数字都不会以零开头。 示例: 输入:(2 -> 4 -> 3) + (5 -> 6 -> 4) 输出:7 -> 0 -> 8 原因:342 + 465 = 807 裸模拟题…练练手… /**...原创 2018-09-21 14:58:56 · 163 阅读 · 0 评论 -
CCF 201612-2 火车购票(简单模拟)
问题描述 请实现一个铁路购票系统的简单座位分配算法,来处理一节车厢的座位分配。 假设一节车厢有20排、每一排5个座位。为方便起见,我们用1到100来给所有的座位编号,第一排是1到5号,第二排是6到10号,依次类推,第20排是96到100号。 购票时,一个人可能购一张或多张票,最多不超过5张。如果这几张票可以安排在同一排编号相邻的座位,则应该安排在编号最小的相邻座位。否则应该安排在原创 2016-12-09 16:40:04 · 832 阅读 · 0 评论 -
hdu5818(2016多校第7场,模拟)
Joint Stacks Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 2485 Accepted Submission(s): 381 Problem Description A stack is a data原创 2016-08-11 15:34:56 · 259 阅读 · 0 评论 -
2015亚洲区域赛北京站A(二分)
思路:首先肯定是二分,然后求得一个大致结果,接下来有两种思路就是第一种是根据第一种结果尽可能再靠左的二分,第二种是直接从左到右暴力得到答案。 思路一: #include #include #include #include #include #include #include using namespace std; const long long mod=1e9+7; typedef原创 2016-07-24 12:17:51 · 480 阅读 · 0 评论 -
hdu1013(模拟题)
Problem Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the result原创 2015-09-23 20:18:27 · 487 阅读 · 0 评论 -
uva 133(模拟)
In a serious attempt to downsize (reduce) the dole queue, The NewNational Green Labour Rhinoceros Party has decided on the followingstrategy. Every day all dole applicants will be placed in a largecir原创 2015-05-19 21:13:19 · 405 阅读 · 0 评论 -
uva 202求循环小数
The decimal expansion of the fraction 1/33 is , wherethe is used to indicate that the cycle 03 repeatsindefinitely with no intervening digits. In fact, the decimal expansion ofevery rational numb原创 2015-05-19 21:21:20 · 597 阅读 · 0 评论 -
cf(找规律,模拟)
A. Median Smoothing time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A schoolboy named Vasya loves reading b原创 2015-10-29 21:25:36 · 535 阅读 · 0 评论 -
cf(旋转矩阵)
Description Inna and Dima decided to surprise Sereja. They brought a really huge candy matrix, it's big even for Sereja! Let's number the rows of the giant matrix from 1 to n from top to bottom a原创 2015-10-31 14:36:46 · 780 阅读 · 0 评论 -
cf(模拟)
B. Robot's Task time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Robot Doc is located in the hall, with n com原创 2015-11-09 19:18:40 · 506 阅读 · 0 评论 -
leetcode 68
给定一个单词数组和一个长度maxWidth,重新排版单词,使其成为每行恰好有maxWidth个字符,且左右两端对齐的文本。 你应该使用“贪心算法”来放置给定的单词;也就是说,尽可能多地往每行中放置单词。必要时可用空格' '填充,使得每行恰好有maxWidth个字符。 要求尽可能均匀分配单词间的空格数量。如果某一行单词间的空格不能均匀分配,则左侧放置的空格数要多于右侧的空格数。 ...原创 2019-03-02 18:15:42 · 317 阅读 · 0 评论