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

甘肃系统建站怎么用竞价推广账户竞价托管

甘肃系统建站怎么用,竞价推广账户竞价托管,幼教网站模板,网站 会员管理文章目录 牛客 寒假集训2A Tokitsukaze and Bracelet牛客 寒假集训2B Tokitsukaze and Cats牛客 寒假集训2D Tokitsukaze and Slash Draw牛客 寒假集训2E Tokitsukaze and Eliminate (easy)牛客 寒假集训2F Tokitsukaze and Eliminate (hard)牛客 寒假集训2I Tokitsukaze and S…

文章目录

  • 牛客 寒假集训2A Tokitsukaze and Bracelet
  • 牛客 寒假集训2B Tokitsukaze and Cats
  • 牛客 寒假集训2D Tokitsukaze and Slash Draw
  • 牛客 寒假集训2E Tokitsukaze and Eliminate (easy)
  • 牛客 寒假集训2F Tokitsukaze and Eliminate (hard)
  • 牛客 寒假集训2I Tokitsukaze and Short Path (plus)
  • 牛客 寒假集训2J Tokitsukaze and Short Path (minus)
  • 牛客 寒假集训2K Tokitsukaze and Password (easy)

牛客 寒假集训2A Tokitsukaze and Bracelet

题目链接

模拟

#include <bits/stdc++.h>using namespace std;#define int long long
using i64 = long long;typedef pair<int, int> PII;
typedef pair<double, double> PDD;
typedef pair<int, PII> PIII;const int N = 1000010;void solve()
{int n;cin >> n;while (n -- ){int a, b, c;cin >> a >> b >> c;int ans = 0;if (a == 150) ans ++ ;else if (a == 200) ans += 2;if (b == 34 || b == 36 || b == 38 || b == 40) ans ++ ;else if (b == 45) ans += 2;if (c == 34 || c == 36 || c == 38 || c == 40) ans ++ ;else if (c == 45) ans += 2;cout << ans << '\n';}
}signed main()
{ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);int t = 1;// cin >> t;while (t -- ){solve();}
}

牛客 寒假集训2B Tokitsukaze and Cats

题目链接

定义一个表示边界的坐标就可以了

#include <bits/stdc++.h>using namespace std;#define int long long
using i64 = long long;typedef pair<int, int> PII;
typedef pair<double, double> PDD;
typedef pair<int, PII> PIII;const int N = 1000010;void solve()
{int n, m, k;cin >> n >> m >> k;vector<bool> h(n * m + m), s(n * m + n);int ans = 0;while (k -- ){int x, y;cin >> x >> y;if (h[(x - 1) * m + y] == false) ans ++ , h[(x - 1) * m + y] = true;if (h[x * m + y] == false) ans ++ , h[x * m + y] = true;if (s[(y - 1) * n + x] == false) ans ++, s[(y - 1) * n + x] = true;if (s[y * n + x] == false) ans ++ , s[y * n + x] = true;}cout << ans << '\n';
}signed main()
{ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);int t = 1;// cin >> t;while (t -- ){solve();}
}

牛客 寒假集训2D Tokitsukaze and Slash Draw

题目链接

想dp想了好久,本来打算如果所有状态都没变化就break,结果t了,原来是队列bfs,可以记住的trick

#include <bits/stdc++.h>using namespace std;#define int long long
using i64 = long long;typedef pair<int, int> PII;
typedef pair<double, double> PDD;
typedef pair<int, PII> PIII;const int N = 1000010;
const int mod = 1e9 + 7;void solve()
{int n, m, k;cin >> n >> m >> k;vector<PII> info(m);vector<int> ans(n, 0x3f3f3f3f3f3f3f3f);ans[0] = 0;for (int i = 0; i < m; i ++ ) cin >> info[i].first >> info[i].second;	queue<int> q;q.push(0);while (q.size()){auto t = q.front();q.pop();for (int j = 0; j < m; j ++ ){int tmp = (t + info[j].first) % n;if (ans[tmp] > ans[t] + info[j].second){ans[tmp] = ans[t] + info[j].second;q.push(tmp);}}}if (ans[n - k] == 0x3f3f3f3f3f3f3f3f) cout << -1 << '\n';else cout << ans[n - k] << '\n';
}signed main()
{ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);int t = 1;cin >> t;while (t -- ){solve();}
}

牛客 寒假集训2E Tokitsukaze and Eliminate (easy)

题目链接

牛客 寒假集训2F Tokitsukaze and Eliminate (hard)

题目链接

两道题一起说,从后往前的贪心,用set存出现过的颜色,所有颜色都出现一遍了就ans++

#include <bits/stdc++.h>using namespace std;#define int long long
using i64 = long long;typedef pair<int, int> PII;
typedef pair<double, double> PDD;
typedef pair<int, PII> PIII;const int N = 1000010;void solve()
{int n;cin >> n;vector<int> a(n);map<int, int> mp;int sum = 0;for (int i = 0; i < n; i ++ ){cin >> a[i];if (mp[a[i]] == 0) mp[a[i]] ++ , sum ++ ;else mp[a[i]] ++ ;}int ans = 0;int tmp = 0;set<int> st;int lst = n - 1;for (int i = n - 1; i >= 0; i -- ){if (st.find(a[i]) == st.end()) tmp ++ , st.insert(a[i]);if (tmp == sum){ans ++ ;for (int j = i; j <= lst; j ++ ){mp[a[j]] -- ;if (mp[a[j]] == 0) sum -- ;}st.clear();tmp = 0;lst = i - 1;}}if (!st.empty()) ans ++ ;cout << ans << '\n';
}signed main()
{ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);int t = 1;cin >> t;while (t -- ){solve();}
}

牛客 寒假集训2I Tokitsukaze and Short Path (plus)

题目链接

大的点先算,然后就没有了

#include <bits/stdc++.h>using namespace std;#define int long long
using i64 = long long;typedef pair<int, int> PII;
typedef pair<double, double> PDD;
typedef pair<int, PII> PIII;const int N = 1000010;void solve()
{int n;cin >> n;vector<int> a(n);int minn = 0x3f3f3f3f3f3f3f3f;int cnt = 0;for (int i = 0; i < n; i ++ ) cin >> a[i];int tmp = 0;int ans = 0;sort(a.begin(), a.end(), greater<int>());for (int i = 0; i < n; i ++ ) ans += (n - tmp - 1) * 4 * a[i], tmp ++ ;cout << ans << '\n';
}signed main()
{ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);int t = 1;cin >> t;while (t -- ){solve();}
}

牛客 寒假集训2J Tokitsukaze and Short Path (minus)

题目链接

小点的先算

#include <bits/stdc++.h>using namespace std;#define int long long
using i64 = long long;typedef pair<int, int> PII;
typedef pair<double, double> PDD;
typedef pair<int, PII> PIII;const int N = 1000010;void solve()
{int n;cin >> n;vector<int> a(n);int minn = 0x3f3f3f3f3f3f3f3f;int cnt = 0;for (int i = 0; i < n; i ++ ) cin >> a[i];sort(a.begin(), a.end());int ans = 0;for (int i = 0; i < n; i ++ ){if (a[i] * 2 <= a[0] * 4) ans += (n - 1 - i) * a[i] * 2 * 2;else ans += (n - 1 - i) * a[0] * 4 * 2;}cout << ans << '\n';
}signed main()
{ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);int t = 1;cin >> t;while (t -- ){solve();}
}

牛客 寒假集训2K Tokitsukaze and Password (easy)

题目链接

直接dfs

#include <bits/stdc++.h>using namespace std;#define int long long
using i64 = long long;typedef pair<int, int> PII;
typedef pair<double, double> PDD;
typedef pair<int, PII> PIII;const int N = 1000010;
const int mod = 1e9 + 7;void solve()
{int n;cin >> n;string s;int y;cin >> s >> y;if (s.size() == 1 && s[0] == '0'){cout << 1 << '\n';return;}if (s[0] == '0'){cout << 0 << '\n';return;}vector<vector<int>> mp(5);for (int i = 0; i < n; i ++ ){if ((s[i] >= 'a' && s[i] <= 'd') || s[i] == '_'){if (s[i] != '_') mp[s[i] - 'a'].push_back(i);else mp[4].push_back(i);}}int ans = 0;auto get = [&](string x){int res = 0;for (int i = 0; i < x.size(); i ++ ){res += pow(10, (x.size() - i - 1)) * (x[i] - '0');}return res;};vector<bool> st(11);function<void(int, string)> dfs = [&](int u, string ss){if (u == 5){int res = get(ss);if (ss[0] == '0' && ss.size() != 1) return;if (res % 8 == 0 && res <= y) ans = (ans + 1) % mod;return;}if (mp[u].size() == 0) dfs(u + 1, ss);else{string tmp = ss;for (int i = 0; i < 10; i ++ ){// if (mp[u][0] == 0 && i == 0) continue;if (u != 4 && st[i]) continue;if (u != 4) st[i] = true;for (auto t : mp[u]){tmp[t] = '0' + i;}dfs(u + 1, tmp);if (u != 4) st[i] = false;}}};dfs(0, s);cout << ans << '\n';
}signed main()
{ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);int t = 1;cin >> t;while (t -- ){solve();}
}
http://www.hkea.cn/news/350549/

相关文章:

  • 做网站 做好把我踢开北京网站搭建哪家好
  • 网站如何做引流刷外链网站
  • wordpress 站点地址关注公众号一单一结兼职
  • 合肥网站建设第一品牌个人seo外包
  • 省心的免费建站服务热线四川seo关键词工具
  • 网站总是跳转dede58seo对网络推广的作用是
  • seo排名怎么提高seo排名优化软件有用
  • 江门论坛建站模板黑帽seo联系方式
  • 政府网站信息内容建设专项检查搜索引擎排名优化seo课后题
  • 个人做的好的淘宝客网站软文营销推广
  • 城乡建设委员会网站河北seo推广公司
  • 某网站栏目策划2022十大热点事件及评析
  • 德清网站建设中心优化大师官方免费下载
  • 生日网页制作免费网站制作代做网页设计平台
  • 学校类网站特点游戏优化大师官网
  • 手机电视网站大全河南网站建设定制
  • zblog做的商城网站上海有实力的seo推广咨询
  • 免费网站模板psd网络营销的整体概念
  • 网站模板下载破解版环球军事新闻最新消息
  • 徐汇苏州网站建设东莞免费建站公司
  • 厦门网站建设哪家强深圳网站维护
  • 政府网站新媒体平台建设关键词权重查询
  • 重庆网站建设制作公司百度客服人工在线咨询电话
  • 微信公众号平台入口官网奶盘seo伪原创工具
  • 泉州网站建设公司推荐宁德市地图
  • 大厂县住房和城乡建设局网站刷百度指数
  • 低代码开发平台优缺点昆山seo网站优化软件
  • 网站开发年终总结网络营销战略的内容
  • 建立门户网站的意义营销推广网
  • 网站建设网站软件有哪些百度推广开户费用标准