Time of Update: 2018-12-03
public static string NoHTML(string Htmlstring) { //刪除指令碼 Htmlstring = Regex.Replace(Htmlstring, @"<script[^>]*?>.*?</script>", "", RegexOptions.IgnoreCase); //刪除HTML
Time of Update: 2018-12-03
--判斷資料庫是否存在 if exists(select * from master..sysdatabases where name=N’庫名’) print ’exists’ else print ’not exists’ --------------- -- 判斷要建立的表名是否存在 if exists (select * from dbo.sysobjects where id = object_id(N’[dbo].[表名]’) and OBJECTPROPERTY(id,
Time of Update: 2018-12-03
HyperspaceTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 136 Accepted Submission(s): 66Problem DescriptionThe great Mr.Smith has invented a hyperspace particle generator. The device is
Time of Update: 2018-12-03
private string DataTableToJson(DataTable dt) { StringBuilder jsonBuilder = new StringBuilder(); jsonBuilder.Append("{\""); jsonBuilder.Append(dt.TableName); jsonBuilder.Append("\":[");
Time of Update: 2018-12-03
動態規劃#include<cstdio>#include<iostream>using namespace std;int main(){int t,n;int i;int num;int f=1;int ans;int
Time of Update: 2018-12-03
擴充方法:public static DataTable ConvertToDataTable(thisIEnumerable enumerable){ var dataTable = new DataTable(); foreach (PropertyDescriptor pd in TypeDescriptor.GetProperties(typeof(T))) { dataTable.Columns.Add(pd.Name,
Time of Update: 2018-12-03
3991. Eat or StudyTime Limit: 1.0 Seconds Memory Limit:65536KTotal Runs: 127 Accepted Runs:43 As a ACMer, Yan is good at arrange his schedule. On every morning of the term, he will have a choice: study or eating.Especially, Yan can only do
Time of Update: 2018-12-03
js 取得CheckBoxList的選中項的值,遍曆RadioButtonList 擷取CheckBoxList的值var CheckBoxList=document.all.CheckBoxList1; var objCheckBox,CheckValue="";for(i=0;i<CheckBoxList.rows.length;i++) { objCheckBox = document.getElementById("CheckBoxList1_"
Time of Update: 2018-12-03
線段樹 // 1093MS 10568K G++#include<iostream>#include<cstdio>using namespace std;#define maxn 100005#define ls (rt<<1)#define rs (rt<<1|1)#define mid ((t[rt].l+t[rt].r)>>1)int n,m;struct tree{int l,r;int lc,rc,lval,rval;//
Time of Update: 2018-12-03
dijcstra演算法做法是在這個無向圖中,先求出起點到終點的最短路徑,並且標記出起點到終點所經過的節點,然後在採用枚舉法,把其中的道路改變。求出其中的最大值即可。代碼寫的很難看,懶得改了。#include<cstdio>#include<iostream>#include<cstring>using namespace std;#define INF 100001int
Time of Update: 2018-12-03
<html> <head> <meta http-equiv="Content-Type" content="html/text; charset=utf-8"/> <title>JS get Parameter</title> <script src="resource/js/param.js" type="text/javascript"></script> </hea
Time of Update: 2018-12-03
幾何入門先貼著http://blog.csdn.net/wangjian8006#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>using namespace std;#define eps 1e-8#define maxn 110struct Line{double x1,y1,x2,y2;void input(double a,double
Time of Update: 2018-12-03
http://acm.hdu.edu.cn/showproblem.php?pid=4501 可以看作三維背包問題。但是我犯了個錯誤。錯誤原因是物品的的價格或者兌換所需積分可能為0;用0-1背包v[n*v]減少空間的方法的思想時:當處理價格或者兌換所需積分為0的商品時,會導致重複處理(重複放入)物品。 例如:if(j>=c1[i])dp[j][k][g]=Max(dp[j][k][g],dp[j-c1[i]][k][g]+v[i]);if(k>=c2[i])
Time of Update: 2018-12-03
題意為已知F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2.求Fn%10000.這裡運用到了矩陣快速冪的方法。快速冪歸根結底就是:把a^k中的k拆分為2進位例如: 5^5=5^(1*1+0*2+1*4)=5^1*5^4. 計算量從算5次減少到了2次。快速冪再結合矩陣,可以快速解決遞推問題Fn = Fn − 1 + Fn −
Time of Update: 2018-12-03
#include<iostream>#include<algorithm>#include<cstdio>using namespace std;double a[110000];bool cmp(double x,double y){return x>y;}int main(){int n,m;while(cin>>n>>m){for(int i=1;i<=n;i++)scanf("%lf",&a[i]);int
Time of Update: 2018-12-03
ShaolinTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 195 Accepted Submission(s): 99Problem DescriptionShaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin
Time of Update: 2018-12-03
js 代碼function checkLen(obj,len){ if(obj.value.replace(/[^/x00-/xFF]/g,'**').length>=len){ obj.value=leftUTFString(obj.value,len); } } function getStringUTFLength(str) { var value = str.replace(/[^/x00-/xff]/g," "); return
Time of Update: 2018-12-03
/// <summary> /// 建立一個空行 /// </summary> public DataTable AddTableRow() { DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("BNAME", typeof(string)));
Time of Update: 2018-12-03
浙大月賽題目背包問題但是coffin得修建順序是唯一的。網上的題解
Time of Update: 2018-12-03
網路流Dinic演算法狼為源點,羊為匯點。把每個源點串連到一點大源點上,容量為無窮。把每個匯點串連到一點大匯點上,容量為無窮。求出的最大流=最小割=答案。#include <iostream>#include<cstdio>#include<cstring>#include<cstdio>#include<queue>#include<vector>using namespace std;const int maxint=1