Dr. Tuple is working on the new data-mining application for Advanced Commercial Merchandise Inc. One of the subroutines for this application works wit ...
分类:
其他好文 时间:
2021-02-02 11:09:22
阅读次数:
0
https://codeforces.com/problemset/problem/754/D 题意: 给定n组区间,要求选出k组区间保证其交集最大,并输出选出的区间 思路: 区间贪心,优先队列算一下天数即可。 代码: #include<iostream> #include<stdio.h> #in ...
分类:
其他好文 时间:
2021-02-02 10:51:00
阅读次数:
0
https://codeforces.com/contest/1476/problem/D 题意 给 \(n + 1\) 个点和它们之间连接关系, 两点之间是单向的, 每走过一条边, 所有的边反向, 问从某个点开始出发, 能走过的最长的路径是多少 思路 一开始以为要建图, 实际上算是线性dp \(用 ...
分类:
其他好文 时间:
2021-02-02 10:40:54
阅读次数:
0
The computer company you work for is introducing a brand new computer line and is developing a new Unix-like operating system to be introduced along w ...
分类:
其他好文 时间:
2021-02-01 12:53:22
阅读次数:
0
784.字母大小全排列 给定一个字符串S,通过将字符串S中的每个字母转变大小写,我们可以获得一个新的字符串。返回所有可能得到的字符串集合。 示例: 输入:S = "a1b2" 输出:["a1b2", "a1B2", "A1b2", "A1B2"] 输入:S = "3z4" 输出:["3z4", "3 ...
分类:
其他好文 时间:
2021-02-01 12:41:42
阅读次数:
0
LeetCode26 删除排序数组中的重复项 # 删除重复元素,解题方法:双指针 # 1 定义2个指针,慢指针i,从0开始;快指针j,从1开始 # 2 移动指针,如果当前nums[i] = nums[j],则j加1,i不动;如果不相等,则i,j均加1 1 class Solution: 2 def ...
分类:
编程语言 时间:
2021-02-01 12:25:27
阅读次数:
0
? A common typing error is to place the hands on the keyboard one row to the right of the correct position. So ‘Q’ is typed as ‘W’ and ‘J’ is typed as ...
分类:
其他好文 时间:
2021-02-01 12:19:45
阅读次数:
0
? Some DNA sequences exist in circular forms as in the following figure, which shows a circular sequence “CGAGTCAGCT”, that is, the last symbol “T” in ...
分类:
其他好文 时间:
2021-02-01 12:18:46
阅读次数:
0
? Trung is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequence of consecutive integers starting with 1 to N ...
分类:
其他好文 时间:
2021-02-01 12:17:16
阅读次数:
0
E. Pattern Matching 题目链接:https://codeforces.com/contest/1476/problem/E 题目大意:给你n个模式串和m个字符串(长度都为k),要求你将模式串进行排序使得每个字符串在排序后的模式串中第一个匹配的是未排序前的模式串中第mt个模式串。对于 ...
分类:
其他好文 时间:
2021-02-01 11:51:02
阅读次数:
0