A. 就是个带限制的最短路,多开一维状态\(dis(i,j)\)表示到点\(i\),走的路程是\(j\)的最小值 注意各种细节就行了 1 #include<bits/stdc++.h> 2 using namespace std; 3 struct Point 4 { 5 int x,y; 6 Po ...
分类:
其他好文 时间:
2020-03-18 22:05:59
阅读次数:
57
题目链接:https://vjudge.net/problem/UVA-514 思路: 用两个指针 A , B 分别表示 ' 理论上驶出车站的车厢 ' 、 ' 实际上驶出车站的车厢 ' 用循环、栈模拟 (是的这就是刘哥的代码) 1 #include <cstdio> 2 #include <stac ...
分类:
其他好文 时间:
2020-03-18 20:21:20
阅读次数:
78
题目链接:https://codeforces.com/contest/1312 题目大意: 能否对一个数组执行任意次操作,使得其变为目标数组。 对于第i次操作,我们可以放弃,或给数组中任意一个元素加上k^i 想法: 我们不难发现一个数 = k^x + k^y + k^z + ... (x != y ...
分类:
其他好文 时间:
2020-03-18 13:46:27
阅读次数:
64
1 class Solution 2 { 3 vector<vector<int>> res; 4 int sum = 0; 5 public: 6 void helper(vector<int>& nums, int start,int target, vector<int>& out) 7 { ...
分类:
其他好文 时间:
2020-03-17 23:55:47
阅读次数:
93
【题目描述】 X 国有 $n$ 座城市,$n ? 1$ 条长度为 $1$ 的道路,每条道路连接两座城市,且任意两座城市都能通过若干条道路相互到达,显然,城市和道路形成了一棵树。 X 国国王决定将 $k$ 座城市钦定为 X 国的核心城市,这 $k$ 座城市需满足以下两个条件: 1. 这 $k$ 座城市 ...
分类:
其他好文 时间:
2020-03-16 14:58:49
阅读次数:
51
一般是和同事合作完成某一需求。 1.git add . -A 2.git commit 3.git pull 4.git push 如果出现冲突git pull的时候,解决冲突,merge,手动解决 然后git rebase --continue 然后 git push。 如果注释信息填写错误,这个 ...
分类:
其他好文 时间:
2020-03-16 12:47:16
阅读次数:
54
1、逢7跳过小游戏:从1-100之间,遇到带7的数字或者7的倍数跳过。 1 for i in range(1,101): 2 if i == 7 or i % 10 == 7 or i // 10 == 7: 3 continue 4 else: 5 print(i,end = ",") 2、七段数 ...
分类:
编程语言 时间:
2020-03-15 18:51:46
阅读次数:
65
continue:在循环语句中,它会中断正常的控制流程(跳出当次循环),将控制转移到continue所在的流程的首部,然后继续下一次循环例如: for(int j=10;j<15;j++){ if(j==12) continue; cout<<j<<" "; } //打印结果为11 13 14 br ...
分类:
其他好文 时间:
2020-03-15 11:29:48
阅读次数:
610
1.Github项目地址:https://github.com/JameMo/WordCount-for-C 2.在程序的各个模块的开发上耗费的时间: PSP2.1 Personal Software Process Stages 预估耗时(分钟) 实际耗时(分钟) Planning 计划 10 8 ...
分类:
其他好文 时间:
2020-03-15 10:11:38
阅读次数:
51
在创建vue项目中,会选择linter/Formatter,eslint-config-standard "standard"插件代表的是eslint的standard插件都要安装 所以参考一下以下依赖是否安装 eslint babel-eslint eslint-plugin-html eslin ...
分类:
其他好文 时间:
2020-03-14 21:59:16
阅读次数:
378