kuangbin专题一 简单搜索
弱菜做了好久23333333........
传送门: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=105278#overview
A 只能摆k个棋子,只能摆在#
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int max_n = ;
char maze[max_n][max_n];
bool vis[max_n];
int n, m, ans, cnt;
void init(){
memset(maze, , sizeof(maze));
ans = cnt = ;
}
void dfs(int k){
if(cnt == m){ ++ans; return ; }
if(k > n) return ;
for(int i = ; i < n; ++i){
if(maze[i][k] == '#' && !vis[i]){
vis[i] = ; ++cnt;
dfs(k+);
vis[i] = ; --cnt;
}
}
dfs(k+);
}
int main(){
ios::sync_with_stdio(false);
while(cin >> n >> m){
if(n == m && n == -) break;
init();
for(int i = ; i < n; ++i){
cin.get();
for(int j = ; j < n; ++j) cin >> maze[i][j];
}
dfs();
cout << ans << endl;
}
return ;
}
B 三维BFS
#include <cstdio>
#include <queue>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int max_n = ;
const int cx[] = {, , , -, , };
const int cy[] = {, , -, , , };
const int cz[] = {, , , , , -};
int maze[max_n][max_n][max_n];
bool vis[max_n][max_n][max_n];
struct point{
int x, y, z, step;
};
int L, R, C;
int ex, ey, ez;
int main(){
ios::sync_with_stdio(false);
while(cin >> L >> R >> C){
if(L == && R == && C == ) break;
queue<point> q;
memset(vis, , sizeof(vis));
memset(maze, , sizeof(maze));
for(int k = ; k < L; ++k){
for(int i = ; i < R; ++i){
cin.get();
for(int j = ; j < C; ++j){
char ch = cin.get();
if(ch == 'S'){
maze[k][i][j] = ;
point p = {k, i, j, };
q.push(p);
}
else if(ch == '.') maze[k][i][j] = ;
else if(ch == 'E'){
maze[k][i][j] = ;
ex = k; ey = i; ez = j;
}
}
}
cin.get();
}
int x, y, z, step;
while(!q.empty()){
point p = q.front();
q.pop();
x = p.x, y = p.y, z = p.z, step = p.step;
if(x == ex && y == ey && z == ez) break;
for(int i = ; i < ; ++i){
int nx = x + cx[i], ny = y + cy[i], nz = z + cz[i];
if(nx<||L<nx||ny<||R<ny||nz<||C<nz) continue;
if(maze[nx][ny][nz]){
maze[nx][ny][nz] = ;
point tp = {nx, ny, nz, step + };
q.push(tp);
}
}
}
if(x == ex && y == ey && z == ez) printf("Escaped in %d minute(s).\n", step);
else printf("Trapped!\n");
}
return ;
}
C 搜......
#include <cstdio>
#include <queue>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
struct point{
int x, step;
};
int S, E;
int vis[];
int main(){
ios::sync_with_stdio(false);
while(cin >> S >> E){
memset(vis, , sizeof(vis));
vis[S] = ;
queue<point> q;
q.push(point{S, });
int x, step;
while(!q.empty()){
point p = q.front();
x = p.x; step = p.step;
q.pop();
if(x == E) break;
for(int i = ; i < ; ++i){
int nx;
if(i == ) nx = x + ;
else if(i == ) nx = x - ;
else nx = x << ;
if( <= nx && nx <= && !vis[nx]){ q.push(point{nx, step+}); vis[nx] = ; }
}
}
cout << step << endl;
}
return ;
}
D 卡了好久看了题解 第一行确定下来后其他行的也都确定下来了(说的好有道理),所以枚举第一行状态,确定下其他行,看最后一行是否都是0
然后在这道题发现了之前二进制枚举的一个错误....... 正确姿势:(i>>j) & 1(吧?)
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std; const int MAXN = ;
const int INF = 0x3f3f3f3f;
const int cx[] = {, , -, };
const int cy[] = {, -, , };
int n, m;
int ans[MAXN][MAXN];
int flip[MAXN][MAXN];
int origin[MAXN][MAXN]; int check(int x, int y){
int cnt = origin[x][y];
for(int i = ; i < ; ++i){
int nx = x + cx[i], ny = y + cy[i];
if(nx >= && nx < n && ny >= && ny < m)
cnt += flip[nx][ny];
}
return cnt & ;
} int duang(){
for(int i = ; i < n; ++i)
for(int j = ; j < m; ++j)
if(check(i-, j)) flip[i][j] = ;
for(int j = ; j < m; ++j)
if(check(n-, j)) return ;
int cnt = ;
for(int i = ; i < n; ++i)
for(int j = ; j < m; ++j)
cnt += flip[i][j];
return cnt;
} int main(){
while(cin >> n >> m){
memset(origin, , sizeof(origin));
for(int i = ; i < n; ++i)
for(int j = ; j < m; ++j)
cin >> origin[i][j];
int tans = INF;
for(int i = ; i < (<<m); ++i){
memset(flip, , sizeof(flip));
for(int j = ; j < m; ++j)
flip[][j] = (i>>j) & ;
int cnt = duang();
if(cnt < tans && cnt != ){
tans = cnt;
memcpy(ans, flip, sizeof(flip));
}
}
if(tans == INF) cout << "IMPOSSIBLE" << endl;
else{
for(int i = ; i < n; ++i)
for(int j = ; j < m; ++j)
cout << ans[i][j] << " \n"[j==m-];
}
}
return ;
}
E 听说答案都在long long范围内hhhh.......
#include <queue>
#include <iostream>
#include <algorithm>
using namespace std;
typedef long long ll;
int main(){
ios::sync_with_stdio(false);
int n;
while(cin >> n){
if(n == ) break;
queue<ll> q;
q.push(1LL);
while(!q.empty()){
ll k = q.front();
q.pop();
if(k % n == ){
cout << k << endl;
break;
}
q.push(k*);
q.push(k*+);
}
}
return ;
}
F GOJ有这道题........
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <cmath>
#include <string>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <iostream>
#include <algorithm>
using namespace std;
int m, n;
bool isPrime[];
int vis[];
void preprocess(){
memset(isPrime, true, sizeof(isPrime));
isPrime[] = isPrime[] = false;
for(int i = ; i < ; ++i){
if(isPrime[i]){
for(int j = i; i*j < ; ++j){
isPrime[i*j] = false;
}
}
}
}
void bfs(){
memset(vis, , sizeof(vis));
vis[m] = ;
queue<int> q;
q.push(m);
while(!q.empty()){
int k = q.front();
q.pop();
int d[] = {k/, k%/, k%/, k%};
int b[] = {, , , };
for(int i = ; i < ; ++i){
for(int j = ; j < ; ++j){
int t = k - d[i] * b[i] + j * b[i];
if(k == n) return ;
if(t > && isPrime[t] && !vis[t]){
vis[t] = vis[k] + ;
q.push(t);
}
}
}
}
return ;
}
int main(){
ios::sync_with_stdio(false);
preprocess();
int t;
cin >> t;
while(t--){
cin >> m >> n;
bfs();
if(vis[n]) cout << vis[n]- << endl;
else cout << "Impossible" << endl;
}
return ;
}
G 水 直接模拟 略坑是第一张都是最底的一张
#include <set>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std; int main(){
int t;
cin >> t;
for(int x = ; x <= t; ++x){
int l;
cin >> l;
string str1, str2, desstr;
cin >> str1 >> str2 >> desstr;
int step = ;
set<string> s;
s.insert(str1+str2);
bool flag = true;
while(flag){
string tmpstr;
for(int i = ; i < l; ++i){
tmpstr += str2[i];
tmpstr += str1[i];
}
//cout << tmpstr << endl;
++step;
if(tmpstr == desstr) break;
if(s.count(tmpstr)){
flag = false;
break;
}
s.insert(tmpstr);
str1 = tmpstr.substr(, l);
str2 = tmpstr.substr(l, *l);
//cout << str1 << " " << str2 << endl;
}
cout << x << ' ' << (flag ? step : -) << endl;
}
return ;
}
H M题写吐了H不想做.......
还是搜 6种状态
I 暴力找两个#搜.......
#include <queue>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std; const int INF = 0x3f3f3f;
const int cx[] = {, , , -};
const int cy[] = {, -, , };
int n, m;
int dis[][];
char map[][]; struct Point{
int x, y;
Point(){}
Point(int xx, int yy) :x(xx), y(yy){}
};
queue<Point> q;
int bfs(int x1, int y1, int x2, int y2){
memset(dis, INF, sizeof(dis));
q.push(Point(x1, y1));
q.push(Point(x2, y2));
dis[x1][y1] = ;
dis[x2][y2] = ;
while (!q.empty()){
Point p = q.front();
q.pop();
for (int i = ; i < ; i++){
int xx = p.x + cx[i], yy = p.y + cy[i];
if (xx >= && xx < n && yy >= && yy<m && map[xx][yy] == '#' && dis[xx][yy] > dis[p.x][p.y] + ){
dis[xx][yy] = dis[p.x][p.y] + ;
q.push(Point(xx, yy));
}
}
} int ret = ;
for (int i = ; i < n; i++)
for (int j = ; j < m; j++)
if (map[i][j] == '#')
ret = max(ret, dis[i][j]);
return ret;
} int main(){
int t;
cin >> t;
for (int x = ; x <= t; x++){
while(!q.empty()) q.pop();
cin >> n >> m;
for (int i = ; i < n; i++)
cin >> map[i];
int ans = INF;
for (int i = ; i < n; i++)
for (int j = ; j < m; j++)
if (map[i][j] == '#')
for (int ii = ; ii < n; ii++)
for (int jj = ; jj < m; jj++)
if (map[ii][jj] == '#'){
int temp = bfs(i, j, ii, jj);
ans = min(ans, temp);
}
if (ans == INF) ans = -;
cout << "Case " << x << ": " << ans << endl;
}
return ;
}
J 多处火.....先处理火,再处理人,遇到可行的情况退出来
#include <bits/stdc++.h>
using namespace std; struct pos{
int x, y;
pos(int xx = , int yy = ): x(xx), y(yy) {}
};
const int MAXN = ;
const int INF = 0x7f7f7f7f;
const int cx[] = {, , , -};
const int cy[] = {, -, , };
int n, m;
int jx, jy, fx, fy;
int maze[MAXN][MAXN];
int jstep[MAXN][MAXN];
int fstep[MAXN][MAXN]; int main(){
int t;
cin >> t;
while(t--){
cin >> n >> m;
queue<pos> qf;
memset(fstep, -, sizeof(fstep));
for(int i = ; i < n; ++i){
cin.get();
for(int j = ; j < m; ++j){
char ch;
cin >> ch;
if(ch == '#') maze[i][j] = ;
else{
maze[i][j] = ;
if(ch == 'J'){
jx = i;
jy = j;
}
else if(ch == 'F'){
fx = i;
fy = j;
qf.push(pos(fx, fy));
fstep[fx][fy] = ;
}
}
}
}
while(!qf.empty()){
pos p = qf.front();
int x = p.x, y = p.y;
qf.pop();
for(int i = ; i < ; ++i){
int nx = x + cx[i], ny = y + cy[i];
if(nx < || n <= nx || ny < || m <= ny || maze[nx][ny] == || fstep[nx][ny] != -) continue;
qf.push(pos(nx, ny));
fstep[nx][ny] = fstep[x][y] + ;
}
}
// cout << endl;
// for(int i = 0; i < n; ++i){
// for(int j = 0; j < m; ++j)
// cout << fstep[i][j] << '\t';
// cout << endl;
// }
memset(jstep, -, sizeof(jstep));
queue<pos> qj;
qj.push(pos(jx, jy));
jstep[jx][jy] = ;
int ans = -;
while(!qj.empty()){
pos p = qj.front();
int x = p.x, y = p.y;
qj.pop();
if(x == || x == n- || y == || y == m-){
ans = jstep[x][y];
break;
}
for(int i = ; i < ; ++i){
int nx = x + cx[i], ny = y + cy[i];
if(nx < || n <= nx || ny < || m <= ny || maze[nx][ny] == || jstep[nx][ny] != - || (fstep[nx][ny] != - && fstep[nx][ny] <= jstep[x][y] + )) continue;
qj.push(pos(nx, ny));
jstep[nx][ny] = jstep[x][y] + ;
}
}
// cout << endl;
// for(int i = 0; i < n; ++i){
// for(int j = 0; j < m; ++j)
// cout << jstep[i][j] << '\t';
// cout << endl;
// }
if(ans == -) cout << "IMPOSSIBLE" << endl;
else cout << ans+ << endl;
}
return ;
}
K 搜 开数组记录上一个点的坐标
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <iostream>
#include <algorithm>
using namespace std;
struct point{
int x, y;
};
int maze[][];
point state[][];
const int cx[] = {, , , -};
const int cy[] = {, -, , };
int main(){
ios::sync_with_stdio(false);
memset(state, , sizeof(state));
for(int i = ; i < ; ++i)
for(int j = ; j < ; ++j)
cin >> maze[i][j];
queue<point> q;
q.push({, });
maze[][] = ;
bool flag = false;
while(!q.empty()){
point k = q.front();
q.pop();
for(int i = ; i < ; ++i){
int x = k.x + cx[i], y = k.y + cy[i];
if(x < || x > || y < || y > || maze[x][y]) continue;
q.push({x, y});
maze[x][y] = ;
state[x][y] = k;
if(x == && y == ){
flag = true;
break;
}
}
if(flag) break;
}
point k = {, };
stack<point> s;
while(!(k.x == && k.y == )){
s.push(k);
k = state[k.x][k.y];
}
s.push(point{, });
while(!s.empty()){
cout << "(" << s.top().x << ", " << s.top().y << ")" << endl;
s.pop();
}
return ;
}
L 数水坑类的 8个方向
#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int ans;
char maze[][];
const int cx[] = {, , , , , -, -, -};
const int cy[] = {, -, , -, , , , -};
void dfs(int x, int y){
maze[x][y] = '*';
for(int i = ; i < ; ++i){
int nx = x + cx[i], ny = y + cy[i];
if(maze[nx][ny] == '@') dfs(nx, ny);
}
}
int main(){
ios::sync_with_stdio(false);
int m, n;
while(cin >> m >> n){
if(m == && n == ) break;
ans = ;
for(int i = ; i < m; ++i){
cin.get();
for(int j = ; j < n; ++j)
cin >> maze[i][j];
}
for(int i = ; i < m; ++i){
for(int j = ; j < n; ++j){
if(maze[i][j] == '@'){
++ans;
dfs(i, j);
}
}
}
cout << ans << endl;
}
return ;
}
M 可乐.....改了好久蜜汁哇 果断重写 简直恶心
#include <bits/stdc++.h>
using namespace std;
//#define print() cout<<ts<<" "<<tn<<" "<<tm<<endl; struct state{
int s, n, m;
state(int ss = , int nn = , int mm = ): s(ss), n(nn), m(mm) {}
};
int s, n, m;
queue<state> q;
const int MAXN = ;
int step[MAXN][MAXN][MAXN]; int main(){
while(cin >> s >> n >> m){
if(s == && n == && m == ) break;
if(s & ) cout << "NO" << endl;
else{
while(!q.empty()) q.pop();
memset(step, -, sizeof(step));
int ans = -;
q.push(state(s, , ));
step[s][][] = ;
while(!q.empty()){
state p = q.front();
q.pop();
int ss = p.s, nn = p.n, mm = p.m;
if((ss == s/ && nn == s/) || (ss == s/ && mm == s/) || (nn == s/ && mm == s/)){
ans = step[ss][nn][mm];
break;
}
state tmp;
//s -> n || s -> m
if(ss){
//s -> n
if(ss > n - nn){
tmp.s = ss - (n - nn);
tmp.n = n;
tmp.m = mm;
}
else{
tmp.s = ;
tmp.n = nn + ss;
tmp.m = mm;
}
if(step[tmp.s][tmp.n][tmp.m] == -){
step[tmp.s][tmp.n][tmp.m] = step[ss][nn][mm] + ;
q.push(tmp);
}
//ss -> m
if(ss > m - mm){
tmp.s = ss - (m - mm);
tmp.m = m;
tmp.n = nn;
}
else{
tmp.s = ;
tmp.m = mm + ss;
tmp.n = nn;
}
if(step[tmp.s][tmp.n][tmp.m] == -){
step[tmp.s][tmp.n][tmp.m] = step[ss][nn][mm] + ;
q.push(tmp);
}
}
//n -> s || n -> m
if(nn){
//n -> s
if(nn > s - ss){
tmp.n = nn - (s - ss);
tmp.s = s;
tmp.m = mm;
}
else{
tmp.n = ;
tmp.s = ss + nn;
tmp.m = mm;
}
if(step[tmp.s][tmp.n][tmp.m] == -){
step[tmp.s][tmp.n][tmp.m] = step[ss][nn][mm] + ;
q.push(tmp);
}
//n -> m
if(nn > m - mm){
tmp.n = nn - (m - mm);
tmp.m = m;
tmp.s = ss;
}
else{
tmp.n = ;
tmp.m = mm + nn;
tmp.s = ss;
}
if(step[tmp.s][tmp.n][tmp.m] == -){
step[tmp.s][tmp.n][tmp.m] = step[ss][nn][mm] + ;
q.push(tmp);
}
}
//m -> n || m -> s
if(mm){
//m -> n
if(mm > n - nn){
tmp.m = mm - (n - nn);
tmp.n = n;
tmp.s = ss;
}
else{
tmp.m = ;
tmp.n = nn + mm;
tmp.s = ss;
}
if(step[tmp.s][tmp.n][tmp.m] == -){
step[tmp.s][tmp.n][tmp.m] = step[ss][nn][mm] + ;
q.push(tmp);
}
//m -> s
if(mm > s - ss){
tmp.m = mm - (s - ss);
tmp.s = s;
tmp.n = nn;
}
else{
tmp.m = ;
tmp.s = mm + ss;
tmp.n = nn;
}
if(step[tmp.s][tmp.n][tmp.m] == -){
step[tmp.s][tmp.n][tmp.m] = step[ss][nn][mm] + ;
q.push(tmp);
}
}
}
if(ans == -) cout << "NO" << endl;
else cout << ans << endl;
}
}
return ;
}
N 从两个人的位置开始bfs整个图
#include <queue>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std; struct pos{
int x, y;
pos(int xx, int yy): x(xx), y(yy){};
};
const int MAXN = ;
char maze[MAXN][MAXN];
const int cx[] = {, -, , };
const int cy[] = {, , , -};
vector<pos> kfc;
queue<pos> qy; int yx, yy, stepy[MAXN][MAXN];
queue<pos> qm; int mx, my, stepm[MAXN][MAXN]; int main(){
int n, m;
while(cin >> n >> m){
kfc.clear();
for(int i = ; i < n; ++i){
cin.get();
for(int j = ; j < m; ++j){
char ch;
cin >> ch;
if(ch == '#') maze[i][j] = ch;
else{
if(ch == 'Y'){
yx = i;
yy = j;
}
if(ch == 'M'){
mx = i;
my = j;
}
if(ch == '@')
kfc.push_back(pos(i, j));
maze[i][j] = '.';
}
}
}
while(!qy.empty()) qy.pop();
while(!qm.empty()) qm.pop();
memset(stepy, -, sizeof(stepy));
memset(stepm, -, sizeof(stepm));
qy.push(pos(yx, yy));
stepy[yx][yy] = ;
while(!qy.empty()){
int x = qy.front().x, y = qy.front().y;
qy.pop();
for(int i = ; i < ; ++i){
int nx = x + cx[i], ny = y + cy[i];
if(nx < || n < nx || ny < || m < ny || maze[nx][ny] == '#' || stepy[nx][ny] != -) continue;
stepy[nx][ny] = stepy[x][y] + ;
qy.push(pos(nx, ny));
}
}
qm.push(pos(mx, my));
stepm[mx][my] = ;
while(!qm.empty()){
int x = qm.front().x, y = qm.front().y;
qm.pop();
for(int i = ; i < ; ++i){
int nx = x + cx[i], ny = y + cy[i];
if(nx < || n < nx || ny < || m < ny || maze[nx][ny] == '#' || stepm[nx][ny] != -) continue;
stepm[nx][ny] = stepm[x][y] + ;
qm.push(pos(nx, ny));
}
}
int ans = 0x7f7f7f7f;
for(vector<pos>::iterator i = kfc.begin(); i != kfc.end(); ++i){
int x = (*i).x, y = (*i).y;
ans = min(ans, stepy[x][y] + stepm[x][y]);
}
cout << ans* << endl;
}
return ;
}
.............................................................................
kuangbin专题一 简单搜索的更多相关文章
- [kuangbin带你飞]专题一 简单搜索 题解报告
又重头开始刷kuangbin,有些题用了和以前不一样的思路解决.全部题解如下 点击每道题的标题即可跳转至VJ题目页面. A-棋盘问题 棋子不能摆在相同行和相同列,所以我们可以依此枚举每一行,然后标记每 ...
- [kuangbin带你飞]专题一 简单搜索(回顾)
A - 棋盘问题 POJ - 1321 注意条件:不能每放一个棋子,就标记一行和一列,我们直接枚举每一行就可以了. AC代码: #include<iostream> #include< ...
- kuangbin专题 专题一 简单搜索 Oil Deposits HDU - 1241
题目链接:https://vjudge.net/problem/HDU-1241 题意:问有几个油田,一个油田由相邻的‘@’,组成. 思路:bfs,dfs都可以,只需要遍历地图,遇到‘@’,跑一遍搜索 ...
- kuangbin专题 专题一 简单搜索 迷宫问题 POJ - 3984
题目链接:https://vjudge.net/problem/POJ-3984 这个题目,emm,上代码,看的估计应该是刚开始接触搜索的,我带点注释,你能慢慢理解. #include <ios ...
- kuangbin专题 专题一 简单搜索 Fire! UVA - 11624
题目链接:https://vjudge.net/problem/UVA-11624 题意:一个迷宫,可能有一个或者多个地方着火了,每过1个时间消耗,火会向四周蔓延,问Joe能不能逃出迷宫,只要走出迷宫 ...
- kuangbin专题 专题一 简单搜索 Fliptile POJ - 3279
题目链接:https://vjudge.net/problem/POJ-3279 题意:格子有两面,1表示黑色格子,0表示白色格子,奶牛每次可以踩一个格子,踩到的格子和它周围的上下左右格子都会翻面,也 ...
- kuangbin专题 专题一 简单搜索 Shuffle'm Up POJ - 3087
题意:(1)有两副颜色多样的扑克牌,(A~H)表示不同颜色,给你两副牌,S1,S2和一副你需要洗出的KEY,S12由S2最底部,S1底部...一直下去,直到洗成S12,就是图片展示的那样.(2)洗好的 ...
- kuangbin专题 专题一 简单搜索 Prime Path POJ - 3126
题目链接:https://vjudge.net/problem/POJ-3126 题意:给你两个四位的素数N,M,每次改变N四位数中的其中一位,如果能经过有限次数的替换变成四位数M,那么求出最少替换次 ...
- kuangbin专题 专题一 简单搜索 Dungeon Master POJ - 2251
题目链接:https://vjudge.net/problem/POJ-2251 题意:简单的三维地图 思路:直接上代码... #include <iostream> #include & ...
随机推荐
- [转]unload dynamic library needs two dlclose() calls?
src: http://stackoverflow.com/questions/8793099/unload-dynamic-library-needs-two-dlclose-calls Quest ...
- 【C#】聊聊不需要记密码的密码管理补充帖 —— 具体实现
开篇第一句话,就是“小白继续,有实际经验的兄弟们可以洗洗睡了”,因为这个 Lite 版是个实验性的实现,也由于水平原因源码不忍直视,所以如果你坚持看完了,请留下宝贵意见. 以下,干货: 基本模式: 程 ...
- 由浅入深shell脚本训练
由浅入深shell脚本训练 最近一直在学习Shell,以前一直觉得Shell语法很难,不好学,现在总算有一些收获了.其实Shell脚本就是一堆linux命令的集合,把脚本里每一步的命令搞懂是什么意思, ...
- MongoDB集群与LBS应用系列(一)
MongoDB集群与LBS应用系列(一) 1. 概念 MongoDB作为著名的NoSQL,早已非常流行.它的地理应用也非常成熟,被foursquare用于生产环境也已经多时.本文主要记录今年6月份的一 ...
- ASP.NET MVC 用户登录Login
ASP.NET MVC 用户登录Login一.先来看个框架例子:(这个是网上收集到的) 第一步:创建一个类库ClassLibrary831. 第二步:编写一个类实现IHttpM ...
- EntityFramework5提供的迁移工具
目录 背景之前是如何做的?EntityFramework5提供了更好的选择备注 背景返回目录 刚毕业做项目的时候,没有用“迁移”这个概念,系统发布和更新的过程让人非常痛苦,在学习 Ruby On Ra ...
- ASP.NET MVC2.0学习笔记:路由设置
Route设置 在 <Professional in ASP.NET MVC2.0>一书的第四章,主要讲述了Route的简单设置.格式化设置.约束设置.区域路由.匹配文件.路由调试以及对R ...
- HDU 3127 WHUgirls dp背包问题
WHUgirls Time Limit: 3000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total ...
- JDBC开发
1.JDBC简介 )数据库驱动 )Sun公司为简化数据库开发,定义了一套jdbc接口,这套接口由数据库厂商去实现,这样,开发人员只需要学习jdbc接口,并通过jdbc加载具体的驱动,就可以操作数据库. ...
- [置顶] SQL注入安全分析
(一) 应用环境列表 网络互联设备操作系统 序号 操作系统名称 设备名称 脆弱性 1 IOS_路由器_内部_1 route1 2 IOS_路由器_VPN_1 路由器_VPN_1 3 IOS ...