快乐模拟
有难度的模拟
繁星蓝雨
Happy coding!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
第九届蓝桥杯C++B组:螺旋折线
如图p1.png所示的螺旋折线经过平面上所有整点恰好一次。对于整点(X, Y),我们定义它到原点的距离dis(X, Y)是从原点到(X, Y)的螺旋折线段的长度。例如dis(0, 1)=3, dis(-2, -1)=9 给出整点坐标(X, Y),你能计算出dis(X, Y)吗?【输入格式】X和Y 对于40%的数据,-1000 <= X, Y <= 1...原创 2019-03-17 17:04:01 · 662 阅读 · 0 评论 -
第九届蓝桥杯C++B组:乘积最大(附带解题思路、代码和测试数据)
给定N个整数A1, A2, ... AN。请你从中选出K个数,使其乘积最大。 请你求出最大的乘积,由于乘积可能超出整型范围,你只需输出乘积除以1000000009的余数。 注意,如果X<0, 我们定义X除以1000000009的余数是负(-X)除以1000000009的余数。即:0-((0-x) % 1000000009)【输入格式】第一行包含两个整数N和K。 ...原创 2019-03-17 17:08:54 · 1576 阅读 · 0 评论 -
第五届蓝桥杯C++B组:蚂蚁感冒
长100厘米的细长直杆子上有n只蚂蚁。它们的头有的朝左,有的朝右。 每只蚂蚁都只能沿着杆子向前爬,速度是1厘米/秒。 当两只蚂蚁碰面时,它们会同时掉头往相反的方向爬行。 这些蚂蚁中,有1只蚂蚁感冒了。并且在和其它蚂蚁碰面时,会把感冒传染给碰到的蚂蚁。 请你计算,当所有蚂蚁都爬离杆子时,有多少只蚂蚁患上了感冒。【数据格式】 第一...原创 2019-03-13 14:42:52 · 564 阅读 · 0 评论 -
1026 Table Tennis (30分)
文章目录1 题目2 解析2.1 题意2.2 思路3 参考代码1 题目1026 Table Tennis (30分)A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some t...原创 2020-02-27 00:03:05 · 602 阅读 · 0 评论 -
1014 Waiting in Line (30分)
文章目录1 题目2 解析2.1 题意2.2 思路3 参考代码1 题目1014 Waiting in Line (30分)Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two pa...原创 2020-02-26 20:34:16 · 434 阅读 · 0 评论 -
Numeric Keypad———模拟
文章目录1 题目2 解析2.1 题意2.2 思路3 参考代码3.1 高位枚举3.1.13.1.23.2 低位枚举1 题目Numeric Keypad时间限制 1000 ms 内存限制 32768 KB 代码长度限制 100 KB 判断程序 Standard (来自 小小)题目描述The numberic keypad on your mobile phone looks like be...原创 2020-03-02 23:12:01 · 734 阅读 · 0 评论 -
Spring Outing————模拟
文章目录1 题目2 解析2.1 题意2.2 思路3 参考代码1 题目Spring Outing时间限制 1000 ms 内存限制 32768 KB 代码长度限制 100 KB 判断程序 Standard (来自 小小)题目描述You class are planning for a spring outing. N people are voting for adestination...原创 2020-03-02 23:28:55 · 798 阅读 · 0 评论 -
S-expression————模拟
文章目录1 题目2 解析2.1 题意2.2 思路3 参考代码1 题目S-expression时间限制 1000 ms 内存限制 32768 KB 代码长度限制 100 KB 判断程序 Standard (来自 小小)题目描述S-expression is a prefix notation invented for and popularized by theprogramming ...原创 2020-03-02 23:43:09 · 877 阅读 · 0 评论 -
1105 Spiral Matrix (25分)
文章目录1 题目2 解析2.1 题意2.2 思路3 参考代码1 题目1105 Spiral Matrix (25分)This time your job is to fill a sequence of N positive integers into a spiral matrix in non-increasing order. A spiral matrix is filled in...原创 2020-02-26 10:14:59 · 440 阅读 · 0 评论
分享