国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當(dāng)前位置: 首頁(yè) > news >正文

網(wǎng)站標(biāo)識(shí)代碼怎么加網(wǎng)絡(luò)產(chǎn)品運(yùn)營(yíng)與推廣

網(wǎng)站標(biāo)識(shí)代碼怎么加,網(wǎng)絡(luò)產(chǎn)品運(yùn)營(yíng)與推廣,wordpress ui iphone,??诰W(wǎng)站建設(shè)搜q479185700洛谷P1101單詞方陣:用sta存字符串,for找到‘y的位置,然后dfs對(duì)字符串用for進(jìn)行一個(gè)一個(gè)的判斷,不符合就return,下面再用for進(jìn)行book標(biāo)記,能執(zhí)行下面的for說(shuō)明上面沒(méi)有return,所以說(shuō)明找到&#…

洛谷P1101單詞方陣:用sta存字符串,for找到‘y'的位置,然后dfs對(duì)字符串用for進(jìn)行一個(gè)一個(gè)的判斷,不符合就return,下面再用for進(jìn)行book標(biāo)記,能執(zhí)行下面的for說(shuō)明上面沒(méi)有return,所以說(shuō)明找到,book標(biāo)記字符串長(zhǎng)度就行,然后for+if判斷book為true就輸出,不然就輸出*就行。

#include<iostream>
#include<cstring>
using namespace std;
const int N = 105;
int n;
string sta = "yizhong";
char ch[N][N];
bool book[N][N];
int dx[8] = {0, 0, 1, -1, 1, -1, 1, -1}, dy[8] = {1, -1, 0, 0, 1, -1, -1, 1};
void dfs(int x, int y, int xd, int yd){int a = x + xd, b = y + yd;for(int i = 1; i < 7; i++){if(sta[i] != ch[a][b])return;a += xd;b += yd;}for(int i = 0; i < 7; i++){book[x][y] = true;x += xd;y += yd;} 
}
int main(){cin >> n;for(int i = 1; i <= n; i++){for(int j = 1; j <= n; j++){cin >> ch[i][j];}}for(int i = 1; i <= n; i++){for(int j = 1; j <= n; j++){if(ch[i][j] == 'y'){for(int k = 0; k < 8; k++) dfs(i, j, dx[k], dy[k]);} } }for(int i = 1; i <= n; i++){for(int j = 1; j <= n; j++){if(book[i][j]) cout << ch[i][j];else cout << '*' ;}cout << endl;}return 0;
}

洛谷P2404自然數(shù)的拆分問(wèn)題:DFS

#include<iostream>
using namespace std;
int n, m;
int p[15] = {1};
void dfs(int x){for(int i = p[x - 1]; i <= m; i++){if(i == n)continue;p[x] = i;m -= i;if(m == 0){for(int j = 1; j < x; j++){cout << p[j] << '+';}cout << p[x] << endl;}else dfs(x + 1);m += i;}
}
int main(){cin >> n;m = n;dfs(1);return 0;
}

洛谷P1596一道BFS,求連通塊數(shù)量。

#include<iostream>
#include<queue>
using namespace std;
const int N = 105;
int n, m;
bool st[N][N];
char ch[N][N];
int ans;
int dx[8] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[8] = {1, -1, 0, 0, 1, -1, -1, 1};
typedef pair<int, int> PII;
void bfs(int a, int b){queue<PII> q;q.push({a, b});st[a][b] = true;while(q.size()){auto t = q.front();q.pop();int x = t.first, y = t.second;for(int i = 0; i < 8; i++){int xx = x + dx[i], yy = y + dy[i];if(xx >= 1 && xx <= n && yy >= 1 && yy <= m && !st[xx][yy] && ch[xx][yy] == 'W'){st[xx][yy] = true;q.push({xx, yy});}}}ans++;
}
int main(){cin >> n >> m;for(int i = 1; i <= n; i++){for(int j = 1; j <= m; j++){cin >> ch[i][j];}}for(int i = 1; i <= n; i++){for(int j = 1; j <= m; j++){if(ch[i][j] == 'W' && !st[i][j])bfs(i, j);}}cout << ans << endl;return 0;
}

洛谷P1162填色:相當(dāng)于圍墻加水,里面的是水也就是2, 外面的為0,外面從0,0開(kāi)始把圍墻外的數(shù)通過(guò)BFS都給標(biāo)記成3,然后是3就輸出0,原來(lái)的圍墻1不變,然后圍墻里面本來(lái)是0,的就輸出2。

#include<iostream>
#include<queue>
using namespace std;
const int N = 35;
int a[N][N];
int n;
bool st[N][N];
int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0};
typedef pair<int, int> PII; 
void bfs(){queue<PII> q;q.push({0, 0});st[0][0] = true;while(q.size()){auto t = q.front();q.pop();int x = t.first, y = t.second;for(int i = 0; i < 4; i++){int xx = x + dx[i], yy = y + dy[i];if(xx >= 0 && xx <= n + 1 && yy >= 0 && yy <= n + 1 && !st[xx][yy] && a[xx][yy] == 0){a[xx][yy] = 3;st[xx][yy] = true;q.push({xx, yy});}}}
}
int main(){cin >> n;for(int i = 1; i <= n; i++){for(int j = 1; j <= n; j++){cin >> a[i][j];}}bfs();for(int i = 1; i <= n; i++){for(int j = 1; j <= n; j++){if(a[i][j] == 3) cout << 0 << ' ';else if(a[i][j] == 1) cout << 1 << ' ';else cout << 2 << ' '; }cout << endl;}return 0;
}

http://aloenet.com.cn/news/30384.html

相關(guān)文章:

  • 學(xué)做餃子餡上那個(gè)網(wǎng)站推廣優(yōu)化師
  • 局域網(wǎng)建設(shè)簡(jiǎn)單的影視網(wǎng)站seo搜狗排名點(diǎn)擊
  • 荔灣網(wǎng)站制作如何搜索網(wǎng)頁(yè)關(guān)鍵詞
  • 有什么網(wǎng)站可以做微信支付寶支付寶一鍵制作單頁(yè)網(wǎng)站
  • 惠州有哪些做網(wǎng)站的公司百度熱門(mén)
  • 幫客戶(hù)做網(wǎng)站平臺(tái)犯法嗎南寧關(guān)鍵詞優(yōu)化公司
  • 服裝市場(chǎng)網(wǎng)站建設(shè)互聯(lián)網(wǎng)營(yíng)銷(xiāo)師報(bào)名費(fèi)
  • 域名購(gòu)買(mǎi)后網(wǎng)站搭建賬號(hào)seo是什么
  • 自己怎么做VIP視頻解網(wǎng)站汕頭網(wǎng)站建設(shè)技術(shù)外包
  • 橙子建站客服電話(huà)2020 惠州seo服務(wù)
  • 京網(wǎng)站建設(shè)公司百度地圖收錄提交入口
  • 程序員 做網(wǎng)站 微信公眾號(hào) 賺錢(qián)寧波seo推廣費(fèi)用
  • 做網(wǎng)站也是一門(mén)技術(shù)惠州網(wǎng)絡(luò)營(yíng)銷(xiāo)
  • 網(wǎng)站 禁止ping百度seo推廣
  • 網(wǎng)站建設(shè)必學(xué)課程深圳谷歌seo推廣
  • 阿里巴巴做網(wǎng)站找誰(shuí)泰州百度seo公司
  • 網(wǎng)站運(yùn)行與維護(hù)網(wǎng)絡(luò)推廣外包內(nèi)容
  • 網(wǎng)頁(yè)上海公司seo工資服務(wù)
  • 免費(fèi)網(wǎng)站開(kāi)發(fā)軟件平臺(tái)愛(ài)站網(wǎng)長(zhǎng)尾詞挖掘工具
  • 網(wǎng)站開(kāi)發(fā)要什么樣的環(huán)境代運(yùn)營(yíng)公司
  • 網(wǎng)站建設(shè)網(wǎng)站軟文范文
  • 番禺手機(jī)網(wǎng)站制作推廣行者seo
  • 做外貿(mào)網(wǎng)站效果站長(zhǎng)是什么級(jí)別
  • 網(wǎng)站設(shè)計(jì)與網(wǎng)頁(yè)配色實(shí)例精講nba最新新聞新浪
  • 做英文企業(yè)網(wǎng)站多錢(qián)錢(qián)上海百度推廣官方電話(huà)
  • 建設(shè)標(biāo)準(zhǔn) 免費(fèi)下載網(wǎng)站磁力天堂torrentkitty
  • 部落沖突做任務(wù)網(wǎng)站百度熱搜廣告位
  • 給公司做網(wǎng)站銷(xiāo)售怎樣啦網(wǎng)絡(luò)公司品牌推廣
  • 企業(yè)戰(zhàn)略規(guī)劃方案北京seo網(wǎng)絡(luò)推廣
  • 網(wǎng)頁(yè)設(shè)計(jì)公司金華關(guān)鍵詞排名優(yōu)化公司外包