Loading

上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 74 下一页
摘要: 题目背景 windy 定义了一种 windy 数。 题目描述 不含前导零且相邻两个数字之差至少为 22 的正整数被称为 windy 数。windy 想知道,在 aa和 bb 之间,包括 aa 和 bb ,总共有多少个 windy 数? 输入格式 输入只有一行两个整数,分别表示 aa 和 bb。 输出 阅读全文
posted @ 2021-04-28 16:19 脂环 阅读(69) 评论(0) 推荐(1) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/15329/F 来源:牛客网 题目描述 There’s a new art installation in town, and it inspires you... to play a childish game. The 阅读全文
posted @ 2021-04-26 09:39 脂环 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目描述 对一个由(,),[,]括号组成的字符串,求出其中最长的括号匹配子串。具体来说,满足如下条件的字符串成为括号匹配的字符串: 1.(),[]是括号匹配的字符串。 2.若A是括号匹配的串,则(A),[A]是括号匹配的字符串。 3.若A,B是括号匹配的字符串,则AB也是括号匹配的字符串。 例如:( 阅读全文
posted @ 2021-04-24 10:24 脂环 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/11171/B 来源:牛客网 小 Q 的院子里种了 n朵彼岸花,其中第 i 朵的彼岸花的美丽值为 ai,彼岸花按照编号从小到大从左向右排成了一排。 现在小 Q 有 m 个问题,他每次会给出一个区间 [l,r][l,r],他 阅读全文
posted @ 2021-04-24 00:02 脂环 阅读(106) 评论(2) 推荐(0) 编辑
摘要: Avin is studying series. A series is called "wave" if the following conditions are satisfied: It contains at least two elements; All elements at odd p 阅读全文
posted @ 2021-04-23 10:12 脂环 阅读(57) 评论(0) 推荐(0) 编辑
摘要: Avin has two trees which are not connected. He asks you to add an edge between them to make them connected while minimizing the function \(\Sigma_{i = 阅读全文
posted @ 2021-04-22 23:51 脂环 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目描述 在数轴上有 n个闭区间从 1 至 n 编号,第 i 个闭区间为 [li,ri][l**i,r**i] 。 现在要从中选出 m 个区间,使得这 m 个区间共同包含至少一个位置。换句话说,就是使得存在一个 x ,使得对于每一个被选中的区间 [li,ri][l**i,r**i],都有 li≤x≤ 阅读全文
posted @ 2021-04-15 10:40 脂环 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 题目描述 在MarsMar**s星球上,每个MarsMar**s人都随身佩带着一串能量项链。在项链上有NN颗能量珠。能量珠是一颗有头标记与尾标记的珠子,这些标记对应着某个正整数。并且,对于相邻的两颗珠子,前一颗珠子的尾标记一定等于后一颗珠子的头标记。因为只有这样,通过吸盘(吸盘是MarsMar**s 阅读全文
posted @ 2021-04-14 16:04 脂环 阅读(136) 评论(0) 推荐(0) 编辑
摘要: You are given three integers a, 𝑏b and c. Find two positive integers x and y (x>0, y>0) such that: the decimal representation of x without leading ze 阅读全文
posted @ 2021-04-14 14:27 脂环 阅读(131) 评论(0) 推荐(0) 编辑
摘要: You have a card deck of n cards, numbered from top to bottom, i. e. the top card has index 1and bottom card — index n. Each card has its color: the 𝑖 阅读全文
posted @ 2021-04-14 13:24 脂环 阅读(95) 评论(0) 推荐(0) 编辑
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 74 下一页