8.1 PAT dfs+dijkstra 重做 // PAT 1018 #include<stdio.h> #include<vector> #include<map> #include<algorithm> using namespace std; const int N = 600; const ...
分类:
其他好文 时间:
2020-11-07 16:44:48
阅读次数:
17
请完成以下题目 class String { public: String(const char *str = NULL);// 普通构造函数 String(const String &other); // 拷贝构造函数 ~ String(void); // 析构函数 String & operat ...
分类:
其他好文 时间:
2020-11-07 16:20:20
阅读次数:
21
一、多线程 头文件: `#include<pthread.h>` * 1 函数声明: `int pthread_create(pthread_t*restrict tidp,const pthread_attr_t *restrict_attr,void*(*start_rtn)(void*),vo ...
分类:
编程语言 时间:
2020-11-07 16:19:10
阅读次数:
22
参考:https://blog.csdn.net/lihefei_coder/article/details/105435358 const fs = require('fs'); const path = require('path'); const mime = require('mime-ty ...
分类:
Web程序 时间:
2020-11-07 16:00:29
阅读次数:
27
int Fun(int x){ int res=0; while (x) res+=x&1,x>>=1; return res; } int Mycmp(const void* a,const void* b){ return (Fun(*(int*)a) - Fun(*(int*)b))? Fun ...
分类:
编程语言 时间:
2020-11-07 15:46:24
阅读次数:
19
有些时候,为了图省力,我们没准会这样的调用一个函数 unordered_map< pair<int, int>, int > mp; 但是很显然的是,这样的写法是会报错的,因为pair还没有HASH键值。 error: call to implicitly-deleted default const ...
分类:
其他好文 时间:
2020-11-06 02:18:29
阅读次数:
20
1、如何获取当前页面的滚动位置? const getScrollPosition = (el = window) => ({ x: el.pageXOffset !== undefined ? el.pageXOffset : el.scrollLeft, y: el.pageYOffset !== ...
分类:
其他好文 时间:
2020-11-06 02:14:27
阅读次数:
15
给定一棵树,树上每个结点刚开始有一个人,现在每个人需要走到一个不同于原来的结点,并且必须保证每个结点上仍然有且仅有一个人,在树上走一条边的代价为 $1$,求最小代价。 ...
分类:
其他好文 时间:
2020-11-06 02:09:44
阅读次数:
23
强联通分量及缩点 #include<bits/stdc++.h> #define re register #define v e[i].to using namespace std; const int lzw=1e4+3; int n,m,head[lzw],tot,h[lzw],cnt,dfn[ ...
分类:
其他好文 时间:
2020-11-06 01:55:25
阅读次数:
17
所谓自动装配,就是将一个 Bean 注入到其他 Bean 的 Property 中,类似于以下: <bean id = "customer" class = "com.shiyanlou.spring.autowire.common.Customer" autowire = "byName" /> ...
分类:
其他好文 时间:
2020-11-04 19:21:46
阅读次数:
33