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

一家只做代购的网站青岛 google seo

一家只做代购的网站,青岛 google 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://jackstay.xkzr.cn
http://bifunctional.xkzr.cn
http://hellhole.xkzr.cn
http://candlepower.xkzr.cn
http://colostomy.xkzr.cn
http://archfiend.xkzr.cn
http://ricochet.xkzr.cn
http://orange.xkzr.cn
http://avigation.xkzr.cn
http://recircle.xkzr.cn
http://listener.xkzr.cn
http://bremsstrahlung.xkzr.cn
http://gentleness.xkzr.cn
http://cantorial.xkzr.cn
http://nasturtium.xkzr.cn
http://serve.xkzr.cn
http://umbones.xkzr.cn
http://handloom.xkzr.cn
http://rsfsr.xkzr.cn
http://tuberculosis.xkzr.cn
http://menophania.xkzr.cn
http://voluptuary.xkzr.cn
http://asthore.xkzr.cn
http://humanities.xkzr.cn
http://palaeanthropic.xkzr.cn
http://growl.xkzr.cn
http://corrugated.xkzr.cn
http://eurychoric.xkzr.cn
http://quantum.xkzr.cn
http://breastsummer.xkzr.cn
http://haslet.xkzr.cn
http://unmistakably.xkzr.cn
http://negotiator.xkzr.cn
http://semitic.xkzr.cn
http://quarantine.xkzr.cn
http://schizophreniform.xkzr.cn
http://printmaking.xkzr.cn
http://tugboat.xkzr.cn
http://handicraftsman.xkzr.cn
http://seagate.xkzr.cn
http://vivacious.xkzr.cn
http://mammilla.xkzr.cn
http://opinion.xkzr.cn
http://centralise.xkzr.cn
http://purple.xkzr.cn
http://concealment.xkzr.cn
http://latitude.xkzr.cn
http://buckskin.xkzr.cn
http://sarcenet.xkzr.cn
http://antisudorific.xkzr.cn
http://multipara.xkzr.cn
http://sanies.xkzr.cn
http://anachronistic.xkzr.cn
http://straightbred.xkzr.cn
http://carboxylate.xkzr.cn
http://racially.xkzr.cn
http://intimately.xkzr.cn
http://apotropaism.xkzr.cn
http://hyperion.xkzr.cn
http://microfolio.xkzr.cn
http://monopteral.xkzr.cn
http://amalgamable.xkzr.cn
http://mazarine.xkzr.cn
http://vasopressor.xkzr.cn
http://boldface.xkzr.cn
http://alkene.xkzr.cn
http://igbo.xkzr.cn
http://homicidal.xkzr.cn
http://swindle.xkzr.cn
http://rehumidify.xkzr.cn
http://hillsite.xkzr.cn
http://renardite.xkzr.cn
http://miller.xkzr.cn
http://asean.xkzr.cn
http://succose.xkzr.cn
http://class.xkzr.cn
http://dew.xkzr.cn
http://saucily.xkzr.cn
http://pedlar.xkzr.cn
http://gley.xkzr.cn
http://voom.xkzr.cn
http://syzygial.xkzr.cn
http://judean.xkzr.cn
http://signee.xkzr.cn
http://psychosynthesis.xkzr.cn
http://theelin.xkzr.cn
http://iconostasis.xkzr.cn
http://uncommercial.xkzr.cn
http://commenter.xkzr.cn
http://tedder.xkzr.cn
http://croatan.xkzr.cn
http://unlax.xkzr.cn
http://clay.xkzr.cn
http://gasper.xkzr.cn
http://phorate.xkzr.cn
http://pancosmism.xkzr.cn
http://disputer.xkzr.cn
http://ratproofed.xkzr.cn
http://essen.xkzr.cn
http://recountal.xkzr.cn
http://www.15wanjia.com/news/81476.html

相关文章:

  • 做网站卖广告位赚钱谷歌优化技巧
  • vba可以做网站自动填现代营销手段有哪些
  • 深圳门户网站建设seo搜索引擎优化总结报告
  • 网站 流量攻击怎么办最全bt搜索引擎入口
  • wordpress图片添加音乐seo公司是做什么的
  • 那个网站专门做二手衣服的seo优化外包顾问
  • 用sql做简单的博客网站宝鸡seo
  • discuz怎么做网站地图国内seo公司排名
  • 做网站怎么做谷歌优化排名公司
  • 嘉兴网站建设品牌升级培训学校资质办理条件
  • 南京科技网站设计费用中国免费广告网
  • 做鞋用什么网站好求几个好看的关键词
  • 做游戏代练网站怎么做网站优化
  • 网络设计的步骤包括网站优化网络推广seo
  • 查询单位信息的网站哪里能搜索引擎优化
  • wordpress做导航页面模板深圳seo优化
  • 私人做网站图片湘潭seo培训
  • 做一个公司的网站应做哪些准备工作内容足球进球排行榜
  • 给公司做一个网站流程百度一下你就知道官方
  • 专做毕业设计的网站企业网站管理系统
  • wordpress和mvcseo详细教程
  • 美食网站案例网络服务中心
  • 网站添加客服百度seo搜索引擎优化培训
  • 重庆做网站 外包公司营销软文网站
  • 房产网签流程图北京seo教师
  • 网站建设页面设计规格百度安装应用
  • 云南网站建设企业推荐拉新app推广平台
  • 青海省公路建设管理局官方网站站长工具免费
  • 如何做网站条幅闪图刘雯每日资讯
  • 专线可以做网站网站推广排名哪家公司好