Loading

上一页 1 ··· 60 61 62 63 64 65 66 67 68 ··· 75 下一页
摘要: The multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the r 阅读全文
posted @ 2020-03-19 00:46 脂环 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Once Petya read a problem about a bracket sequence. He gave it much thought but didn't find a solution. Today you will face it. You are given string s 阅读全文
posted @ 2020-03-18 20:44 脂环 阅读(282) 评论(0) 推荐(0) 编辑
摘要: We give the following inductive definition of a “regular brackets” sequence: the empty sequence is a regular brackets sequence, if s is a regular brac 阅读全文
posted @ 2020-03-18 12:20 脂环 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Gappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it's Hal 阅读全文
posted @ 2020-03-18 01:01 脂环 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 题目描述 在一个圆形操场的四周摆放 NNN 堆石子,现要将石子有次序地合并成一堆.规定每次只能选相邻的2堆合并成新的一堆,并将新的一堆的石子数,记为该次合并的得分。 试设计出一个算法,计算出将 NNN 堆石子合并成 111 堆的最小得分和最大得分。 输入格式 数据的第 111 行是正整数 NNN,表 阅读全文
posted @ 2020-03-17 11:15 脂环 阅读(200) 评论(0) 推荐(0) 编辑
摘要: Description 在科学计算中经常要计算矩阵的乘积。矩阵A和B可乘的条件是矩阵A的列数等于矩阵B的行数。若A是一个p×q的矩阵,B是一个q×r的矩阵,则其乘积C=AB是一个p×r的矩阵。 由公式知计算C=AB总共需要pqr次的数乘。 为了说明在计算矩阵连乘积时加括号方式对整个计算量的影响,我们 阅读全文
posted @ 2020-03-16 21:26 脂环 阅读(456) 评论(0) 推荐(0) 编辑
摘要: You are given a tree consisting of nn nodes. You want to write some labels on the tree's edges such that the following conditions hold: Every label is 阅读全文
posted @ 2020-03-15 23:08 脂环 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Ehab has an array aa of length nn . He has just enough free time to make a new array consisting of nn copies of the old array, written back-to-back. W 阅读全文
posted @ 2020-03-15 18:04 脂环 阅读(212) 评论(0) 推荐(0) 编辑
摘要: You are given a positive integer xx . Find any such 22 positive integers aa and bb such that GCD(a,b)+LCM(a,b)=xGCD(a,b)+LCM(a,b)=x . As a reminder, G 阅读全文
posted @ 2020-03-15 17:54 脂环 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 题目描述 太郎有N只兔子,现在为了方便识别它们,太郎要给他们编号。兔子们向太郎表达了它们对号码的喜好,每个兔子i想要一个整数,介于1和Maxnumber[i]之间(包括1和Maxnumber[i])。当然,每个兔子的编号是不同的。现在太郎想知道一共有多少种编号的方法。 你只用输出答案mod 1000 阅读全文
posted @ 2020-03-15 16:30 脂环 阅读(245) 评论(0) 推荐(0) 编辑
上一页 1 ··· 60 61 62 63 64 65 66 67 68 ··· 75 下一页