网络连接判断,使用WebClient测试获取: 1 public static bool IsWebClientConnected() 2 { 3 try 4 { 5 using (var client = new WebClient()) 6 using (var stream = client. ...
分类:
Web程序 时间:
2020-05-27 15:26:53
阅读次数:
71
题意:给你一组全是$2^d\ (d\ge0)\(的数,询问q次,每次询问一个数,问这个数是否能够由原数组中的数相加得到,如果能,输出最少用多少个数,否则输出\)-1$. 题解:首先贪心得出结论:如果情况成立,那么最少的情况一定是优先用数组中大的数,然后我们用桶记录数组数的个数,从$inf$开始枚举, ...
分类:
其他好文 时间:
2020-05-27 15:19:08
阅读次数:
49
Subquery using Exists 1 or Exists * 回答1 No, SQL Server is smart and knows it is being used for an EXISTS, and returns NO DATA to the system. Quoth Mic ...
分类:
其他好文 时间:
2020-05-27 15:13:30
阅读次数:
59
格式一: Oracle JDBC Thin using a ServiceName: jdbc:oracle:thin:@//<host>:<port>/<service_name> Example: jdbc:oracle:thin:@//192.168.2.1:1521/XE 注意这里的格式,@ ...
分类:
数据库 时间:
2020-05-27 15:08:01
阅读次数:
218
In this Document Goal Fix References Applies to: Oracle Net Services - Version 10.2.0.3 to 11.2.0.3 [Release 10.2 to 11.2]Information in this document ...
分类:
数据库 时间:
2020-05-27 12:09:38
阅读次数:
85
https://codeforces.com/contest/1358 A. Park Lighting 输出 \(\lceil \dfrac{ab}2 \rceil\) #include <bits/stdc++.h> using namespace std; #define repeat(i,a ...
分类:
其他好文 时间:
2020-05-27 01:24:40
阅读次数:
103
传送门 题目大意:几个小朋友围成圈,给i-1个到i小朋友的距离,求离得两个小朋友最远的距离。 题解:直接枚举,o(n^2)范围是1e5超时,考虑尺取或者三分。 分析可知,第i个小朋友到第j个小朋友距离大于j+1个小朋友时,第i+1个小朋友的最远距离要大于到第j个小朋友,由此缩小规模。 #includ ...
分类:
其他好文 时间:
2020-05-27 01:17:04
阅读次数:
91
POJ 2104 K-th Number 题意:给出一段数列,让你求[L,R]区间内第k大的数字 #include <cstdio> #include <cstring> #include <iostream> #include <vector> #include <algorithm> using ...
分类:
其他好文 时间:
2020-05-26 22:13:05
阅读次数:
76
函数模板的实例 #include <iostream> using namespace std; template<typename T> void myswap(T &a, T &b) { T t; t = a; a = b; b = t; } int main() { int x = 1; in ...
分类:
其他好文 时间:
2020-05-26 22:04:23
阅读次数:
59
经典冒泡排序: 思想:俩俩比较,如果是实现升序排序,则俩俩排序的目的就是将其中大的数依次往后挪,或者是将较小的数往前挪; 每一趟外循环的目的就是将这一趟中最大的数放在数组的最后面,或者是将最小的数放在最前面。 例如:3 4 2 5 0 1 六个数,我们采用大数沉底的方法。 【1】先说外循环:即趟数 ...
分类:
编程语言 时间:
2020-05-26 20:25:46
阅读次数:
69