Loading

上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 74 下一页
摘要: 题目背景 kkksc03 的大学生活非常的颓废,平时根本不学习。但是,临近期末考试,他必须要开始抱佛脚,以求不挂科。 题目描述 这次期末考试,kkksc03 需要考 444 科。因此要开始刷习题集,每科都有一个习题集,分别有 s1,s2,s3,s4s_1,s_2,s_3,s_4s1​,s2​,s3​ 阅读全文
posted @ 2020-03-13 20:31 脂环 阅读(988) 评论(0) 推荐(1) 编辑
摘要: 问题描述 很久以前,T王国空前繁荣。为了更好地管理国家,王国修建了大量的快速路,用于连接首都和王国内的各大城市。 为节省经费,T国的大臣们经过思考,制定了一套优秀的修建方案,使得任何一个大城市都能从首都直接或者通过其他大城市间接到达。同时,如果不重复经过大城市,从首都到达每个大城市的方案都是唯一的。 阅读全文
posted @ 2020-03-13 00:31 脂环 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 问题描述 小明开了一家糖果店。他别出心裁:把水果糖包成4颗一包和7颗一包的两种。糖果不能拆包卖。 小朋友来买糖的时候,他就用这两种包装来组合。当然有些糖果数目是无法组合出来的,比如要买 10 颗糖。 你可以用计算机测试一下,在这种包装情况下,最大不能买到的数量是17。大于17的任何数字都可以用4和7 阅读全文
posted @ 2020-03-12 15:59 脂环 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 问题描述 小明这些天一直在思考这样一个奇怪而有趣的问题: 在1~N的某个全排列中有多少个连号区间呢?这里所说的连号区间的定义是: 如果区间[L, R] 里的所有元素(即此排列的第L个到第R个元素)递增排序后能得到一个长度为R-L+1的“连续”数列,则称这个区间连号区间。 当N很小的时候,小明可以很快 阅读全文
posted @ 2020-03-12 11:48 脂环 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Suppose you are performing the following algorithm. There is an array v1,v2,…,vnv1,v2,…,vn filled with zeroes at start. The following operation is app 阅读全文
posted @ 2020-03-10 02:01 脂环 阅读(184) 评论(0) 推荐(0) 编辑
摘要: You are given an array a1,a2,…,ana1,a2,…,an . Array is good if for each pair of indexes i<ji<j the condition j−aj≠i−aij−aj≠i−ai holds. Can you shuffle 阅读全文
posted @ 2020-03-10 01:48 脂环 阅读(204) 评论(0) 推荐(0) 编辑
摘要: You are given two integers nn and mm (m<nm<n). Consider a convex regular polygon of nn vertices. Recall that a regular polygon is a polygon that is eq 阅读全文
posted @ 2020-03-10 01:44 脂环 阅读(221) 评论(0) 推荐(0) 编辑
摘要: You are given an array aa of length nn and array bb of length mm both consisting of only integers 00 and 11 . Consider a matrix cc of size n×mn×m form 阅读全文
posted @ 2020-03-08 15:53 脂环 阅读(215) 评论(0) 推荐(0) 编辑
摘要: You are given an array aa consisting of nn positive integers. Find a non-empty subset of its elements such that their sum is even (i.e. divisible by 2 阅读全文
posted @ 2020-03-08 14:39 脂环 阅读(196) 评论(0) 推荐(0) 编辑
摘要: A bracketed sequence is called correct (regular) if by inserting "+" and "1" you can get a well-formed mathematical expression from it. For example, s 阅读全文
posted @ 2020-03-08 14:35 脂环 阅读(393) 评论(0) 推荐(0) 编辑
上一页 1 ··· 61 62 63 64 65 66 67 68 69 ··· 74 下一页