Loading

摘要: 给你一个整数数组 nums ,除某个元素仅出现 一次 外,其余每个元素都恰出现 三次 。请你找出并返回那个只出现了一次的元素。 示例 1: 输入:nums = [2,2,3,2] 输出:3 示例 2: 输入:nums = [0,1,0,1,0,1,99] 输出:99 提示: 1 ⇐ nums.len 阅读全文
posted @ 2021-04-30 19:07 脂环 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑