Have you ever heard of the word "six degrees of separation"? It is said that two individuals are connected by at most five others. Lee is wondering ab ...
分类:
编程语言 时间:
2019-11-16 14:48:54
阅读次数:
70
Educational Codeforces Round 76 (Rated for Div. 2) A: "Two Rival Students" 水题,找距离最远,特判已经到达端点情况即可 B: "Magic Stick" 分析 ? 最开始想是暴力覆盖整个区间,但1e9很显然不可能,分析样例,盲 ...
分类:
其他好文 时间:
2019-11-16 00:26:20
阅读次数:
55
Given two binary strings, return their sum (also a binary string). The input strings are both non empty and contains only characters 1 or 0. Example 1 ...
分类:
其他好文 时间:
2019-11-16 00:06:10
阅读次数:
55
内置函数 range() print() len() #python内部提供的内置方法 max,min,sorted,map,filter sorted:对可迭代对象进行排序 max求最大值 max(可迭代对象) list = [1, 2, 3, 4, 5] max内部会将list中的值通过for取 ...
分类:
其他好文 时间:
2019-11-15 20:24:19
阅读次数:
70
将字典中的各项转换为元组,使用内置函数sorted排序 方案1:将字典中的项转化为(值,键)元组。(列表解析或zip) 执行结果: 执行结果: 方案2:传递sorted函数的key参数 执行结果: ...
分类:
编程语言 时间:
2019-11-15 20:12:08
阅读次数:
102
Choose two. Which two statements are true about the DUAL table? A) It can display multiple rows and columns. B) It can be accessed only by the SYS use ...
分类:
其他好文 时间:
2019-11-14 13:48:11
阅读次数:
99
A Two Rival Students 题意:共n个人排一排,两个人,位于a,b,相邻位置交换至多x次,最大化abs(a b)的值。 题解:每次交换至多+1,不能超过n 1。 B Magic Stick 题意:给一个数a,有无限次的两种操作:1、若a是偶数,则加上a的一半。2、若a 1,则减去1。 ...
分类:
其他好文 时间:
2019-11-14 09:43:32
阅读次数:
83
链接: https://vjudge.net/problem/LightOJ 1282 题意: You are given two integers: n and k, your task is to find the most significant three digits, and least ...
分类:
其他好文 时间:
2019-11-13 09:19:03
阅读次数:
95
Given two strings s and t , write a function to determine if t is an anagram of s. Example 1: Input: s = "anagram", t = "nagaram" Output: true Example ...
分类:
其他好文 时间:
2019-11-12 09:21:34
阅读次数:
80
349. Intersection of Two Arrays Easy Easy Easy Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], ...
分类:
其他好文 时间:
2019-11-11 12:30:31
阅读次数:
91