一、Dijkstra和spfa 以下示例均使用邻接表。 Dijkstra: void Dijkstra(int S) { priority_queue <pii> Q; while(!Q.empty()) Q.pop(); memset(dis, 0x7f, sizeof(dis); memset( ...
分类:
其他好文 时间:
2020-07-24 21:22:49
阅读次数:
84
给定一个数组 candidates 和一个目标数 target ,找出 candidates 中所有可以使数字和为 target 的组合。 candidates 中的每个数字在每个组合中只能使用一次。 说明: 所有数字(包括目标数)都是正整数。解集不能包含重复的组合。 示例 1: 输入: candi ...
分类:
其他好文 时间:
2020-07-24 21:15:33
阅读次数:
61
public class CIConfig { //唯一id public int id; //条件类型 public ConditionType conditionType; //条件参数 public String param; public CIConfig(int id, Condition ...
分类:
编程语言 时间:
2020-07-24 21:12:33
阅读次数:
73
最近项目中要做一个回滚功能,目的是如果这次发布出现了问题,立马回滚到上一次发布的版本,用jgit实现的,具体方法如下: Java代码 public class GitUtil { private final static String GIT = ".git"; /** * 将文件列表提交到git仓 ...
分类:
其他好文 时间:
2020-07-24 16:12:54
阅读次数:
132
while循环 #-*- coding: utf-8-*- #指定识别utf-8的字符串 1.while循环以及跳出循环 while True: #无限循环 print('i love pyhon') break; #跳出循环 2.变量控制while循环 flage = True #赋值true给变 ...
分类:
其他好文 时间:
2020-07-24 15:41:17
阅读次数:
62
我的错误代码: 1 #include<iostream> 2 #include <iomanip> 3 4 using namespace std; 5 6 int main() 7 { 8 int N; 9 cin>>N; 10 11 int n; 12 int j=1; 13 int sum0= ...
分类:
其他好文 时间:
2020-07-24 15:33:40
阅读次数:
68
线程安全:StringBuilder非线程 StringBuffer线程 / Vector线程 ArrayList非线程 / 快速迭代时不能有其他线程进行操作 进程:操作系统结构的基础:是一个正在执行的程序,计算机中正在运行的程序实例 线程:线程(thread)是进程中某个单一顺序的控制流,是程序运 ...
分类:
编程语言 时间:
2020-07-24 15:32:23
阅读次数:
61
C++语言关键字及注解1、asm:允许在代码中直接插入汇编语言指令。2、auto:用来声明完全可选择的局部变量。3、bool:用来声明布尔逻辑变量。4、break:用来跳出一个do、for、while循环,也可以结束一个switch语句的句子5、case:在switch里面用来检测匹配。6、catch:通常通过throw语句捕获一个异常7、char:用来声明字符变量8、class:创建新的数据类型
分类:
编程语言 时间:
2020-07-24 13:29:53
阅读次数:
92
1 package head.first.java.prize; 2 3 import java.util.*; 4 5 public class test { 6 private static final int mulriple = 5000; 7 public int luckDraw(Lis ...
分类:
编程语言 时间:
2020-07-24 09:26:37
阅读次数:
82
Comments 注释简介 Let's take a quick break from programming and talk about comments. Comments help programmers understand what exactly the computer progra ...
分类:
其他好文 时间:
2020-07-24 09:19:32
阅读次数:
81