Loading

上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 74 下一页
摘要: You are given two integer arrays a and b of length n. You can reverse at most one subarray (continuous subsegment) of the array 𝑎a. Your task is to r 阅读全文
posted @ 2021-04-30 10:52 脂环 阅读(67) 评论(0) 推荐(0) 编辑
摘要: Polycarp is an organizer of a Berland ICPC regional event. There are 𝑛n universities in Berland numbered from 1 to n. Polycarp knows all competitive 阅读全文
posted @ 2021-04-30 10:05 脂环 阅读(102) 评论(0) 推荐(0) 编辑
摘要: There is a n×m grid. You are standing at cell (1,1) and your goal is to finish at cell (n,m). You can move to the neighboring cells to the right or do 阅读全文
posted @ 2021-04-30 09:16 脂环 阅读(110) 评论(0) 推荐(0) 编辑
摘要: You have r red and b blue beans. You'd like to distribute them among several (maybe, one) packets in such a way that each packet: has at least one red 阅读全文
posted @ 2021-04-30 09:01 脂环 阅读(452) 评论(0) 推荐(0) 编辑
摘要: Baby Ehab was toying around with arrays. He has an array a of length n. He defines an array to be good if there's no way to partition it into 2 subseq 阅读全文
posted @ 2021-04-29 21:13 脂环 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/9925/C 来源:牛客网 Given two non-negative integers XX and YY, determine the value of \(\Sigma_{i = 0}^X\Sigma_{j = [ 阅读全文
posted @ 2021-04-29 17:03 脂环 阅读(272) 评论(0) 推荐(0) 编辑
摘要: 有可能是一个本应该有返回值的函数没有写return语句造成的,本地能过OJ上就会报段错误。 阅读全文
posted @ 2021-04-29 16:26 脂环 阅读(1056) 评论(0) 推荐(1) 编辑
摘要: 一只青蛙想要过河。 假定河流被等分为若干个单元格,并且在每一个单元格内都有可能放有一块石子(也有可能没有)。 青蛙可以跳上石子,但是不可以跳入水中。 给你石子的位置列表 stones(用单元格序号 升序 表示), 请判定青蛙能否成功过河(即能否在最后一步跳至最后一块石子上)。 开始时, 青蛙默认已站 阅读全文
posted @ 2021-04-29 09:50 脂环 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 题目描述 给定两个正整数 a 和 b,求在 [a,b]中的所有整数中,每个数码(digit)各出现了多少次。 输入格式 仅包含一行两个整数 a,b,含义如上所述。 输出格式 包含一行十个整数,分别表示 0∼9 在 [a,b]中出现了多少次。 输入输出样例 输入 #1复制 1 99 输出 #1复制 9 阅读全文
posted @ 2021-04-29 00:45 脂环 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Problem Description 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。 不吉利的数字为所有含有4或62的号码。 阅读全文
posted @ 2021-04-28 17:32 脂环 阅读(45) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 74 下一页