上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要: 题目: You are given two integers a and b. In one move, you can choose some integer k from 1 to 10 and add it to a or subtract it from a. In other words, 阅读全文
posted @ 2020-09-12 19:27 ~K2MnO4 阅读(197) 评论(0) 推荐(0)
摘要: 题意: 直线上有N个点。 点i的位置是Xi。从这N个点中选择若干个,给它们加上标记。 对每一个点,其距离为R以内的区域里必须有带有标记的点(自己本身带有标记的点, 可以认为与其距离为 0 的地方有一个带有标记的点)。 在满足这个条件的情况下, 希望能为尽可能少的点添加标记。 请问至少要有多少点被加上 阅读全文
posted @ 2020-08-02 17:59 ~K2MnO4 阅读(105) 评论(0) 推荐(0)
摘要: 题意: 在H * W的地图上有N个奶酪工厂,每个工厂分别生产硬度为1-N的奶酪。有一只老鼠准备从出发点吃遍每一个工厂的奶酪。老鼠有一个体力值,初始时为1,每吃一个工厂的奶酪体力值增加1(每个工厂只能吃一次),且老鼠只能吃硬度不大于当前体力值的奶酪。 老鼠从当前格到上下左右相邻的无障碍物的格需要时间1 阅读全文
posted @ 2020-07-24 08:13 ~K2MnO4 阅读(176) 评论(0) 推荐(0)
摘要: 题目 An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it i 阅读全文
posted @ 2020-07-18 19:30 ~K2MnO4 阅读(123) 评论(0) 推荐(0)
摘要: 题目 明明想在学校中请一些同学一起做一项问卷调查,为了实验的客观性,他先用计算机生成了N个1到1000之间的随机整数(N≤100),对于其中重复的数字,只保留一个,把其余相同的数去掉,不同的数对应着不同的学生的学号。然后再把这些数从小到大排序,按照排好的顺序去找同学做调查。请你协助明明完成“去重”与 阅读全文
posted @ 2020-07-16 17:21 ~K2MnO4 阅读(541) 评论(0) 推荐(0)
摘要: 题目 Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run 阅读全文
posted @ 2020-07-15 17:52 ~K2MnO4 阅读(146) 评论(0) 推荐(0)
摘要: 题目 About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his th 阅读全文
posted @ 2020-07-10 16:59 ~K2MnO4 阅读(127) 评论(0) 推荐(0)
摘要: 最近发现太久没碰的知识点居然手生了,所以决定复习一波之前写过的题,结果还发现之前是写错的,真有意思... 题目: 已知一张地图(以二维矩阵的形式表示)以及佐助和鸣人的位置。地图上的每个位置都可以走到,只不过有些位置上有大蛇丸的手下,需要先打败大蛇丸的手下才能到这些位置。鸣人有一定数量的查克拉,每一个 阅读全文
posted @ 2020-06-19 17:09 ~K2MnO4 阅读(296) 评论(0) 推荐(0)
摘要: 题目 给定一个长度为 n 的数列 a1,a2,…,an,每次可以选择一个区间 [l,r],使下标在这个区间内的数都加一或者都减一。 求至少需要多少次操作才能使数列中的所有数都一样,并求出在保证最少次数的前提下,最终得到的数列可能有多少种。 输入格式 第一行输入正整数n。 接下来n行,每行输入一个整数 阅读全文
posted @ 2020-06-15 17:41 ~K2MnO4 阅读(768) 评论(0) 推荐(0)
摘要: 题目: You are given a sequence a1,a2,…,an consisting of n non-zero integers (i.e. ai≠0). You have to calculate two following values: the number of pairs 阅读全文
posted @ 2020-06-14 16:16 ~K2MnO4 阅读(153) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 下一页