正题 题目链接:https://www.luogu.com.cn/problem/AT4995 题目大意 $n$个点的一棵树,上面有一些棋子,每次可以选择两个棋子移动到他们之间的路径上相邻的点上,求最少多少步能移动到一个点上。 \(n\in[1,2000]\) 解题思路 如果固定最终节点的话,这个节 ...
分类:
其他好文 时间:
2021-02-16 12:00:16
阅读次数:
0
import requests import re import os import json import time as t class QQmusic(): """代码仅供学习""" def __init__(self): """初始化""" self.headers = { 'Accept- ...
分类:
其他好文 时间:
2021-02-15 12:44:00
阅读次数:
0
import threading import time def test1(): print(1+5) def test2(): print(5+8) def test3(): print(5 + 8) def test4(): print(5 + 8) def test5(): print(5 ...
分类:
编程语言 时间:
2021-02-15 12:03:29
阅读次数:
0
Go语言基础之time包 时间和日期是我们编程中经常会用到的,本文主要介绍了Go语言内置的time包的基本用法。 time包 time包提供了时间的显示和测量用的函数。日历的计算采用的是公历。 时间类型 time.Time类型表示时间。我们可以通过time.Now()函数获取当前的时间对象,然后获取 ...
分类:
编程语言 时间:
2021-02-10 13:08:17
阅读次数:
0
This time, you are supposed to find $A+B$ where $A$ and $B$ are two polynomials. Input Specification: Each input file contains one test case. Each cas ...
分类:
其他好文 时间:
2021-02-10 13:03:20
阅读次数:
0
Problem Description Long time ago Alex created an interesting problem about parallelogram. The input data for this problem contained four integer poin ...
分类:
其他好文 时间:
2021-02-10 13:02:09
阅读次数:
0
### go context理解 #### context包 总结起来就一句话:一个接口,四个实现,六个方法 (1.)一个接口 type Context interface { Deadline() (deadline time.Time, ok bool) Done() ←chan struct ...
分类:
其他好文 时间:
2021-02-10 12:51:22
阅读次数:
0
引子: flask中的request 在单进程单线程中没有问题,但是性能肯定是下降的,如果强制开启多线程,会导致线程不安全。但是threading.local() 方法支持多线程,但是不支持多协程 代码: # -*- coding: utf-8 -*- """ threadlocal 上下问管理 源 ...
分类:
其他好文 时间:
2021-02-09 11:46:54
阅读次数:
0
# coding:utf-8 """ Name : 剑指offer58.py Author : qlb Contect : 17801044486@163.com Time : 2021/2/7 14:14 Desc: 左旋字符串 """ class Solution: def reverseLef ...
分类:
其他好文 时间:
2021-02-08 12:34:26
阅读次数:
0
恢复内容开始 # coding:utf-8 """ Name : LeetCode28.py Author : qlb Contect : 17801044486@163.com Time : 2021/2/7 17:17 Desc:实现 strStr() """ class Solution: d ...
分类:
其他好文 时间:
2021-02-08 12:33:47
阅读次数:
0