问题描述: Given n nodes labeled from 0 to n-1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges ...
分类:
其他好文 时间:
2018-06-16 14:26:00
阅读次数:
170
思路:随便想想就能想出来啦把。。。 卡了我一个vector。。。 ...
分类:
其他好文 时间:
2018-06-14 18:34:24
阅读次数:
162
题意:每条边有两个权值a,b,求图的最小二元和乘积生成树(即该树的sum_a*sum_b最小)。 标程: 1 #include<bits/stdc++.h> 2 #define P pair<ll,ll> 3 #define fir first 4 #define sec second 5 usin ...
分类:
其他好文 时间:
2018-06-13 19:41:49
阅读次数:
189
Naive Chef 暴力 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 int main() { 5 int T; 6 scanf("%d", &T); 7 while(T--){ 8 int N, A, B, x, ca = 0, c ...
分类:
其他好文 时间:
2018-06-13 12:00:27
阅读次数:
156
Lee@Lee MINGW64 ~$ git config --global user.name "lspshun" Lee@Lee MINGW64 ~$ git config --global user.email "lspshun@163.com" Lee@Lee MINGW64 ~$ cd ~ ...
分类:
其他好文 时间:
2018-06-09 22:12:05
阅读次数:
227
题意略。 思路:我们来写一下公式: P1:(x1 + t * Vx1,y1 + t * Vy1) P2:(x2 + t * Vx2,y2 + t * Vy2) x1 + t * Vx1 = x2 + t * Vx2 y1 + t * Vy1 = y2 + t * Vy2 a(x1 - x2) = t ...
分类:
其他好文 时间:
2018-06-09 13:28:47
阅读次数:
174
对于大多数未做过接口测试的同学来说,可能并不清楚接口到底是什么,甚至你去问很多做过接口测试的同学什么是接口,他们也说不出个所以然,大多数人可能知道接口大概是什么,也知道怎么测,但是不知道如何用专业的术语去描述出来。 接口的本质:接口就是一个函数,通过将接口部署到web容器(tomcat,jboss, ...
分类:
其他好文 时间:
2018-06-08 20:40:27
阅读次数:
179
During a discussion of problems at the Petrozavodsk Training Camp, Vova and Sasha argued about who of them could in 300 minutes find a pair of equal s ...
分类:
其他好文 时间:
2018-06-08 20:33:39
阅读次数:
173
首先我们从最基本的泛型来看: 现在我们对上面泛型中的类型参数再进一步,也是个泛型会如何呢? 可以看到,java中不支持类型参数也是泛型类型的情况,而scala支持。这是一个很重要的区别,scala在类型系统上要比java强大。我们现在简单对类型归纳一下,可以分为两类: 现在我们来看 higher-k ...
分类:
其他好文 时间:
2018-06-08 15:48:29
阅读次数:
164
1010 Radix (25)(25 分) Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a dec ...
分类:
其他好文 时间:
2018-06-08 14:20:13
阅读次数:
161