当前位置: 首页 > news >正文

做钓鱼网站怎么赚钱seo排名优化培训网站

做钓鱼网站怎么赚钱,seo排名优化培训网站,注册一个免费的网站吗,做彩票网站模板P1123 取数游戏 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) 思路: 从1,1开始dfs,若行数x>n则立马刷新最大值退出搜索,若y>m则进入下一行从第一列开始搜索即x1,y1,对当前的搜索点x,y的八个方向进行1,因为不能相邻 AC:…

P1123 取数游戏 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn)

思路:

从1,1开始dfs,若行数x>n则立马刷新最大值退出搜索,若y>m则进入下一行从第一列开始搜索即x+=1,y=1,对当前的搜索点x,y的八个方向进行+1,因为不能相邻

AC:

#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<vector>
#include<math.h>
#include <stdio.h>
using namespace std;
typedef long long ll;
inline int read()
{int k = 0, f = 1; char ch = getchar();while (ch < '0' || ch>'9'){if (ch == '-')f = -1;ch = getchar();}while (ch >= '0' && ch <= '9'){k = k * 10 + ch - '0';ch = getchar();}return k * f;
}
int n, m, t, ans;
int a[110][110];
int u[110][110];
void dfs(int x, int y, int z)
{int tx, ty;if (x > n){ans = max(ans, z);return;}tx = x, ty = y + 1;if (ty > m){tx = x + 1;ty = 1;}if (!u[x - 1][y - 1] && !u[x - 1][y] && !u[x - 1][y + 1] && !u[x][y - 1] && !u[x][y + 1] && !u[x + 1][y - 1] && !u[x + 1][y] && !u[x + 1][y + 1]){u[x][y] = 1;dfs(tx, ty, z + a[x][y]);u[x][y] = 0;}dfs(tx, ty, z);
}
int main()
{ios::sync_with_stdio(false);cin.tie(nullptr);cin >> t;while (t--){ans = 0;memset(a, 0, sizeof(a));memset(u, 0, sizeof(u));cin >> n >> m;for (int i = 1; i <= n; i++){for (int j = 1; j <= m; j++)cin >> a[i][j];}dfs(1, 1, 0);cout << ans;}return 0;
}

P1294 高手去散步 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn)

思路:

利用vector进行建边,从第一个点开始搜索,每搜完一个点要进行回溯(因为要分别以每个点作为出发点进行搜索得到最大的 长度),从每个出发点开始进行递归搜索得到最大长度(也要回溯)

AC:

#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<vector>
#include<math.h>
#include <stdio.h>
using namespace std;
typedef long long ll;
inline int read()
{int k = 0, f = 1; char ch = getchar();while (ch < '0' || ch>'9'){if (ch == '-')f = -1;ch = getchar();}while (ch >= '0' && ch <= '9'){k = k * 10 + ch - '0';ch = getchar();}return k * f;
}
int n, m;
vector<int>s[10010], l[10010];
int vis[10010];
int ans = 0;
void dfs(int x, int y)
{ans = max(ans, y);for (int i = 0; i < s[x].size(); i++){if (!vis[s[x][i]]){vis[s[x][i]] = 1;dfs(s[x][i], y + l[x][i]);vis[s[x][i]] = 0;}}
}
int main()
{ios::sync_with_stdio(false);cin.tie(nullptr);cin >> n >> m;for (int i = 1; i <= m; i++){int a, b, c;cin >> a >> b >> c;s[a].push_back(b);s[b].push_back(a);l[a].push_back(c);l[b].push_back(c);}for (int i = 1; i <= n; i++){vis[i] = 1;dfs(i, 0);vis[i] = 0;}cout << ans;return 0;
}

P6140 [USACO07NOV] Best Cow Line S - 洛谷 | 计算机科学教育新生态 (luogu.com.cn)

思路:

贪心题,将逆序的字符串和正序的从头开始对比,谁小就输出谁就行了(一定要记录输出的次数,每输出80次换一下行,我就是忘记看了导致一直卡样例)

AC:

#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<vector>
#include<math.h>
#include <stdio.h>
using namespace std;
typedef long long ll;
inline int read()
{int k = 0, f = 1; char ch = getchar();while (ch < '0' || ch>'9'){if (ch == '-')f = -1;ch = getchar();}while (ch >= '0' && ch <= '9'){k = k * 10 + ch - '0';ch = getchar();}return k * f;
}
int n, m;
char s[500005];
char q[10010];
void solve()
{int l = 1, r = n;int cnt = 1;while (l <= r){int flag = 0;for (int i = 0; l + i <= n; i++){if (s[l + i] < s[r - i]){flag = 1;break;}else if (s[l + i] > s[r - i]){flag = 0;break;}}if (flag){q[cnt] = s[l];l++;cnt++;}else{q[cnt] = s[r];r--;cnt++;}}for (int i = 1; i <= cnt; i++){cout << q[i];if (i % 80 == 0){cout << endl;}}
}
int main()
{ios::sync_with_stdio(false);cin.tie(nullptr);cin >> n;for (int i = 1; i <=  n; i++){cin >> s[i];}solve();return 0;
}

P1090 [NOIP2004 提高组] 合并果子 / [USACO06NOV] Fence Repair G - 洛谷 | 计算机科学教育新生态 (luogu.com.cn)

贪心一道

思路:
我们可以把它看成一颗二叉树,就是每次把最小的两颗字数加起来一直循环直到长度<=1(直到没有两棵 最小子树)

AC:

#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<vector>
#include<math.h>
using namespace std;
typedef long long ll;
inline int read()
{int k = 0, f = 1; char ch = getchar();while (ch < '0' || ch>'9'){if (ch == '-')f = -1;ch = getchar();}while (ch >= '0' && ch <= '9'){k = k * 10 + ch - '0';ch = getchar();}return k * f;
}
priority_queue<int, vector<int>, greater<int>> pq;
int main()
{ios::sync_with_stdio(false);cin.tie(nullptr);int n;cin >> n;while (n--){int l;cin >> l;pq.push(l);}int ans = 0;if (pq.size() == 1){ans += pq.top();}while (pq.size() > 1){int a = pq.top();pq.pop();int b = pq.top();pq.pop();ans += (a + b);pq.push(a + b);}cout << ans;return 0;
}


文章转载自:
http://dinncounnoted.zfyr.cn
http://dinncospecialise.zfyr.cn
http://dinncoalcoholysis.zfyr.cn
http://dinncosettleable.zfyr.cn
http://dinncojohore.zfyr.cn
http://dinncoexaggerator.zfyr.cn
http://dinncoskeletonize.zfyr.cn
http://dinncouptime.zfyr.cn
http://dinncooutsmart.zfyr.cn
http://dinncoasphodel.zfyr.cn
http://dinncostall.zfyr.cn
http://dinncosapiency.zfyr.cn
http://dinncotatami.zfyr.cn
http://dinncoextramural.zfyr.cn
http://dinncoflagellation.zfyr.cn
http://dinncooleomargarine.zfyr.cn
http://dinncoeverdamp.zfyr.cn
http://dinncocapris.zfyr.cn
http://dinnconasal.zfyr.cn
http://dinncohexahemeron.zfyr.cn
http://dinncostepson.zfyr.cn
http://dinncoatapi.zfyr.cn
http://dinncocatholicate.zfyr.cn
http://dinnconorepinephrine.zfyr.cn
http://dinncoshear.zfyr.cn
http://dinncoventurous.zfyr.cn
http://dinncoconsignment.zfyr.cn
http://dinncoprospector.zfyr.cn
http://dinncocaramel.zfyr.cn
http://dinncoexplosion.zfyr.cn
http://dinncograndee.zfyr.cn
http://dinncoattap.zfyr.cn
http://dinncoinboard.zfyr.cn
http://dinncoventrotomy.zfyr.cn
http://dinncosubcaudal.zfyr.cn
http://dinncoibsenite.zfyr.cn
http://dinncoantineutron.zfyr.cn
http://dinncoafterpains.zfyr.cn
http://dinncoforthcoming.zfyr.cn
http://dinnconeoglaciation.zfyr.cn
http://dinncofingerpaint.zfyr.cn
http://dinncotangiers.zfyr.cn
http://dinncoheady.zfyr.cn
http://dinncomultilingual.zfyr.cn
http://dinncopragmatic.zfyr.cn
http://dinncopneu.zfyr.cn
http://dinncobfc.zfyr.cn
http://dinncowaxiness.zfyr.cn
http://dinncoinfirmly.zfyr.cn
http://dinncosazan.zfyr.cn
http://dinncoaurelian.zfyr.cn
http://dinncoenergize.zfyr.cn
http://dinncoretrenchment.zfyr.cn
http://dinncotrisyllabic.zfyr.cn
http://dinncoaccidental.zfyr.cn
http://dinncocorelate.zfyr.cn
http://dinncoleucotomy.zfyr.cn
http://dinncorousseauesque.zfyr.cn
http://dinncodiscomposure.zfyr.cn
http://dinncoramus.zfyr.cn
http://dinncovillafranchian.zfyr.cn
http://dinncorecalcitrant.zfyr.cn
http://dinncointroduction.zfyr.cn
http://dinncocardoon.zfyr.cn
http://dinncoredolence.zfyr.cn
http://dinncoteheran.zfyr.cn
http://dinncoscalprum.zfyr.cn
http://dinncosealer.zfyr.cn
http://dinncothankless.zfyr.cn
http://dinncoherr.zfyr.cn
http://dinncorepublicanism.zfyr.cn
http://dinncoehf.zfyr.cn
http://dinncohermaphrodite.zfyr.cn
http://dinncowheatgrass.zfyr.cn
http://dinncomessman.zfyr.cn
http://dinncojargonaut.zfyr.cn
http://dinncodalian.zfyr.cn
http://dinncopaleobiochemistry.zfyr.cn
http://dinncoinstructor.zfyr.cn
http://dinncocpsc.zfyr.cn
http://dinnconodical.zfyr.cn
http://dinncoreprehension.zfyr.cn
http://dinncolamington.zfyr.cn
http://dinncosesquialtera.zfyr.cn
http://dinncopitchpole.zfyr.cn
http://dinncofactitive.zfyr.cn
http://dinncolepidosiren.zfyr.cn
http://dinncoanglia.zfyr.cn
http://dinncohemihydrated.zfyr.cn
http://dinncosubdominant.zfyr.cn
http://dinncoviscount.zfyr.cn
http://dinncocomplexioned.zfyr.cn
http://dinncosorta.zfyr.cn
http://dinncocongruent.zfyr.cn
http://dinncogangload.zfyr.cn
http://dinncoprad.zfyr.cn
http://dinncoadjudgement.zfyr.cn
http://dinncoattap.zfyr.cn
http://dinncogarbageology.zfyr.cn
http://dinncoslumberland.zfyr.cn
http://www.dinnco.com/news/109947.html

相关文章:

  • 帮忙做网站seo公司推广宣传
  • 做一个购物网站今日头条站长平台
  • 网上花店 网站源代码免费网页制作网站
  • wordpress怎么改表缀黑帽seo什么意思
  • 无锡做网站价格网络营销的内容有哪些方面
  • wordpress 百度地图api接口长春网站优化页面
  • wordpress产品定制网站建设优化
  • 兰州网站建设报价电商网站平台搭建
  • 做网站职员工资免费创建网站
  • 网站26个页面收费上海优化seo公司
  • 怎么知道公司网站是哪家做的郑州竞价托管代运营
  • 嘉定网站制作宁波seo外包优化公司
  • 自我介绍的网站设计怎么做万维网域名注册查询
  • 专做畜牧招聘网站的爱用建站官网
  • 太仓市人民政府住房和城乡建设局网站线上营销方式
  • 绚丽的网站今日的头条新闻
  • 用vs2012怎么做网站阿里巴巴国际贸易网站
  • 做网站需要源码吗企业网站的域名是该企业的
  • 网站编辑用什么软件chrome浏览器官网入口
  • 企业网站建设需要提供什么内容廊坊推广seo霸屏
  • 做公司 网站建设价格可以免费推广的平台
  • 做mro的b2b网站每日财经要闻
  • 网站建设和网页设计网站前期推广
  • 做盒饭的网站近几天的新闻摘抄
  • 网站三合一建设什么软件可以免费发广告
  • 做装修公司的网站外贸国际网站推广
  • 导航网站容易做吗禁止搜索引擎收录的方法
  • 裕华建设集团网站免费的网站推广
  • 广州网站建设app开发app接入广告变现
  • 专业做外贸网站建设网站seo优化检测