codeforces-1328E-Tree Queries 传送门:https://codeforces.com/problemset/problem/1328/E 题意:n个结点的树 m次询问 让你找一条从根结点1开始的路径 使一些点在路径上或离路径上的点距离为1 问能不能找到 因为是要求这些点在 ...
分类:
其他好文 时间:
2020-03-28 23:14:10
阅读次数:
101
function trim(str) { if (str && typeof str "string") { return str.replace(/^\s+/,"").replace(/\s+$/,""); //去除前后空白符 } } console.log(' '+trim(' jjj jjj ...
分类:
Web程序 时间:
2020-03-28 21:56:32
阅读次数:
100
C语言实验报告(三) 实验项目: 4.3.1:if语句的应用 4.3.2:switch-case的应用 4.3.3:switch-case嵌套if语句的应用 4.3.4:switch-case结构嵌套的应用 4.3.5:分析程序 项目实训:计算器的实现 姓名:徐志平 实验地点:家 实验时间:2020 ...
分类:
编程语言 时间:
2020-03-28 21:54:27
阅读次数:
199
inspector.query Query the node for specific information. Parameters: scope : Specify scope of the query. System : Return system data. Software : Retur ...
分类:
其他好文 时间:
2020-03-28 21:35:10
阅读次数:
99
```C++#include #include #include using namespace std;const int maxn=99999;struct p{ int l,r;string s;}a[maxn];int dp[1>t; while(t--) { cin>>n; for(int... ...
分类:
其他好文 时间:
2020-03-28 20:14:03
阅读次数:
58
查看 提交 统计 提示 提问 总时间限制: 1000ms 内存限制: 65536kB描述 给定一个十进制正整数n(0 < n < 1000000000),每个数位上数字均不为0。n的位数为m。现在从m位中删除k位(0<k < m),求生成的新整数最小为多少?例如: n = 9128456, k = ...
分类:
其他好文 时间:
2020-03-28 20:04:10
阅读次数:
127
此博客链接:https://www.cnblogs.com/ping2yingshi/p/12588713.html 单词的压缩编码(105min) 题目链接:https://leetcode-cn.com/problems/short-encoding-of-words/ 给定一个单词列表,我们将 ...
分类:
其他好文 时间:
2020-03-28 19:56:56
阅读次数:
77
今天遇到一道题,不得不说,思路决定一切,分享一下我的解题心路历程和对大佬的解题方式的解析与感想。 820. 单词的压缩编码 题目来源:https://leetcode-cn.com/problems/short-encoding-of-words/ 给定一个单词列表,我们将这个列表编码成一个索引字符 ...
分类:
其他好文 时间:
2020-03-28 19:38:35
阅读次数:
112
package main import ( "math/rand" "time" "fmt" ) const ( P = 0.6 MaxLevel = 8 ) func randomLevel() int { i := 1 rand.Seed(time.Now().UnixNano()) for i ...
分类:
其他好文 时间:
2020-03-28 18:05:15
阅读次数:
75
第一种方法: 可以输入多个数据, 按回车结束,输出可以是(列表,元组,集合) def getNum(): #获取用户不定长度的输入 nums = [] iNumStr = input("请输入数字(回车退出): ") while iNumStr != "": nums.append(eval(iNu ...
分类:
其他好文 时间:
2020-03-28 16:23:40
阅读次数:
308