Time of Update: 2018-12-04
這篇博文主要給大家介紹下Win32彙編開發所必須的一些套件。 一、彙編原始碼編譯器——ml.exe。這是開發32彙編所必須的編譯器,其他較低版本的都不可用。用法:ml /c /coff *.asm其中,/c表示只編譯不連結;/coff表示把彙編源檔案(*.asm)編譯成coff檔案格式。 二、資源編譯器——rc.exe。資源編譯器顧名思義就是用來編譯使用者定義的資源檔的,比如菜單、表徵圖、游標等。至於資源的定義、載入、使用將在後續博文中介紹。用法:rc
Time of Update: 2018-12-04
#include<iostream>#include<cstring>#include<cstdlib>#include<algorithm>#include<cstdio>using namespace std;struct node{int x;int y;}a[50005];int cmp(node a,node b){if(a.x==b.x) return a.y<b.y;else return
Time of Update: 2018-12-04
1104.資料排序Time Limit: 1000 MS Memory Limit: 12288 KBTotal Submission(s): 45 Accepted Submission(s): 15DescriptionZZK和SYC不知從哪個老師那裡拿到了一堆實驗資料,需要排序後再交回去。實驗資料的格式為:樣本序號
Time of Update: 2018-12-04
範例輸入31 1 35 6 102 1 21 1 1 501 15 62 1範例輸出50典型的DP最優填表是二維數組,行表示階段,列表示狀態,繼而表格內資料即為該階段該狀態下的最優值。該題每一階段需要用二維數組表示,每遍曆完一個狀態就對數組更新一次,這樣數組內始終是目前狀態下的最優值。#include<iostream>using namespace std;#define NUM 501int trade[NUM][NUM],carry[NUM][NUM];int min(int
Time of Update: 2018-12-04
匈牙利演算法模板題目大牛的blog http://www.byvoid.com/blog/hungary/#include<iostream>#include<cstring>#include<cstdio>using namespace std;bool a[205][205];int mat[205];bool used[205];int n,m;bool crosspath(int k){int
Time of Update: 2018-12-04
#include<iostream>#include<cstring>#include<cstdio>using namespace std;int main(){ char a[110],b[110],c[110],c1[110]; int n,ii; int i,j; int k,up; scanf("%d",&n); for(ii=0;ii<n;ii++){
Time of Update: 2018-12-04
1118.單詞統計Time Limit: 1000 MS Memory Limit: 32768 KBTotal Submission(s): 12 Accepted Submission(s): 1Description給定一個字串和若干個單詞,統計這些單詞在這個字串中出現的次數。Input第一行為一個整數n(1 <= n <= 10000),表示單詞的數量,之後n行每行一個單詞,單詞只由小寫字母組成,最大長度為50。最後一行為一個字串,也只由小寫字母組成,最大長度10
Time of Update: 2018-12-04
1060.找第K大數Time Limit: 1000 MS Memory Limit: 32768 KBTotal Submission(s): 109 Accepted Submission(s): 22Description給定 n(1 <= n <= 10000000) 個正整數(<= 2147483647),找出其中的第K(1 <= K <= 10)大數。Input第一行,兩個整數n, K,第二行n個整數Output第K大數Sample
Time of Update: 2018-12-04
之所以把這兩題放一塊看是因為尋找祖先結點是有區別的,不然一個爆棧,一個TLEhdu1272 小希的迷宮#include<iostream>#include<cstring>#include<cstdio>using namespace std;int root[100001],foot[100001];int find(int t){ //不能用遞迴尋找祖先借點,不然會爆棧,汗 while(root[t]!=t) t=root[t];
Time of Update: 2018-12-04
上傳控制項基礎知識說明:上傳控制項(<input type="file"/>)用於在用戶端瀏覽並上傳檔案,使用者選取的路徑可以由value屬性擷取,但value屬性是唯讀,不能通過javascript來賦值,這就使得不能通過value=""語句來清空它。很容易理解為什麼唯讀,如果可以隨意賦值的話,那麼使用者只要開啟你的網頁,你就可以隨心所欲的上傳他電腦上的檔案了。 js 擷取<intput type=file />的值<html> <script
Time of Update: 2018-12-04
#include<stdio.h>#include<cstring>int father[1001];int n,m;int find(int c){ if(father[c]!=c) father[c]=find(father[c]); return father[c];}void uun(int a,int b){ int aa=find(a); int bb=find(b); father[aa]=bb;}int
Time of Update: 2018-12-04
並查集模版題#include<iostream>#include<cstring>#include<cstdio>using namespace std;int father[50005];int finds(int c){if(father[c]!=c)father[c]=finds(father[c]);return father[c];}void check(int a,int b){int aa=finds(a);int
Time of Update: 2018-12-04
#include<iostream>#include<cstring>#include<algorithm>#include<cstdio>using namespace std;struct node{int x;int y;}list[1002],list1[1002];bool cmp(node a,node b){if(a.x==b.x)return a.y<b.y;elsereturn a.x<b.x;}int main(){
Time of Update: 2018-12-04
準備知識:最長公用上升子序列 http://www.clarkok.com/blog/?p=353#include<iostream>#include<cstring>#include<cstdio>using namespace std;int main(){int a[210],f[210];int t,n;int
Time of Update: 2018-12-04
#include<iostream>#include<cstring>#include<cstdio>using namespace std;int a[1005],f[1005];int main(){int n;int i,j;scanf("%d",&n);for(i=0;i<n;i++){f[i]=1;}for(i=0;i<n;i++)scanf("%d",&a[i]);int
Time of Update: 2018-12-04
AC自動機模板題#include<iostream>#include<cstring>#include<cstdio>using namespace std;struct node{node *fail;node *next[26];int count;}*q[500001];char keyword[51];char str[1000001];int head,tail;void insert(char str[],node *root){node
Time of Update: 2018-12-04
並查集題目用map映射的代碼跑了1100多ms,而採用trie樹儲存人名的代碼僅跑了203ms。採用map映射#include<iostream>#include<cstdio>#include<string>#include<map>using namespace std;int root[10010],sign[10010];map<string,int>list;int find(int
Time of Update: 2018-12-04
這題算是歪打正著,由於我的for迴圈都是從1開始,所以很巧合的把在0模式的job都給排除了,交完之後看了下discuss才發現這個問題,for迴圈從0開始的話需要討論一下for(int i=0;i<k;i++){ scanf("%d%d%d",&cur,&ja,&jb); if(ja*jb!=0) a[ja][jb]=1;}我的AC代碼#include<iostream>#include<cstring>#include<
Time of Update: 2018-12-04
#include<iostream>#include<cstring>#include<cstdio>using namespace std;bool judge(int c){int i;bool flag;if(c%2==0)return 0;for(i=3,flag=1;i*i<=c;i+=2)if(c%i==0){flag=0;break;}if(flag)return 1;return 0;}int main(){int num,i;bool
Time of Update: 2018-12-04
#include<iostream>#include<cstring>#include<cstdio>using namespace std;int root[30005],all[30005],tail[30005];int find(int c){if(root[c]==c) return c;int ori=find(root[c]);tail[c]+=tail[root[c]];