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

好看的移动端网站seo外包公司如何优化

好看的移动端网站,seo外包公司如何优化,时时彩票网站开发,全网分销平台B.莲子的机械动力学 分析&#xff1a;这题有个小坑&#xff0c;如果是00 0&#xff0c;结果记得要输出0。 得到的教训是&#xff0c;避免前导0出现时&#xff0c;要注意答案为0的情况。否则有可能会没有输出 #include<assert.h> #include<cstdio> #include<…

B.莲子的机械动力学

分析:这题有个小坑,如果是0+0 = 0,结果记得要输出0。

得到的教训是,避免前导0出现时,要注意答案为0的情况。否则有可能会没有输出

#include<assert.h>
#include<cstdio>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<stdlib.h>
#include<string>
#include<string.h>
#include <stdio.h>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<sstream>
#include<stack>
#include <utility>
#include<map>
#include <vector>#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define inf 0x3f3f3f3f
//2147483647#define int long long
//#include <bits/stdc++.h>
typedef long long ll;
#include<iostream>
using namespace std;const int N = 1e6 + 10;
long long MAX(long long a, long long b) { return a < b ? b : a; }
long long MIN(long long a, long long b) { return a < b ? a : b; }
int qmi(int a, int k, int p) {int res = 1;while (k) {//后面的a其实是底数与其指数的运算结果了,是不断迭代的//第一个a其实就是a的2的0次方if (k & 1) res = (res * a) % p;a = (a * a) % p;//注意,a是一个不断变化的过程//下一个a就等于上一个a的平方,k >>= 1;}return res;
}
int C(int a, int b,int p) {int ans = 1;int j = a;for (int i = 1; i <= b; i++,j--) {ans = ans * j % p;ans = ans * qmi(i, p - 2, p) % p;}return ans;
}
int lucas(int a, int b,int p) {if (a < p && b < p) {return C(a, b, p);}return C(a % p, b % p, p) * lucas(a / p, b / p, p) % p;}//16:33
int a[N], b[N], c[N];
signed main() {int n, m; cin >> n >> m;for (int i = n; i >= 1; i--) cin >> a[i];for (int i = m; i >= 1; i--) cin >> b[i];//想要a存的是位数比较多的数if (n < m) {swap(a, b);swap(n, m);}for (int i = 1; i <= n; i++) {c[i] += a[i] + b[i];int k = i + 1;int add = c[i] / k;c[i] %= k;c[i + 1] += add;}int f = 0;bool isPrint = false;for (int i = N; i >= 1; i--) {if (c[i] != 0) f = 1;if (f) {if (i != 1) cout << c[i] << " ";else cout << c[i];isPrint = true;}}if (!isPrint) cout << 0;return 0;
}

C-莲子的排版设计学

分析:关键是对于行号的处理,要打印多少空格

#include<cstdio>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<stdlib.h>
#include<string>
#include<string.h>
#include <stdio.h>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<sstream>
#include<stack>
#include <utility>
#include<map>
#include <vector>#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define inf 0x3f3f3f3f
#define int long long
//#include <bits/stdc++.h>
typedef long long ll;
#include<iostream>
using namespace std;const int N = 1e4 + 10;
//long long MAX(long long a, long long b) { return a < b ? b : a; }vector<string> ans;
int num;
int j = 10;
void PrintBlank() {for (int i = 0; i < num; i++) cout << " ";
}
signed main() {   //IOS;string s;int cnt = 0;while (getline(cin,s)) {ans.push_back(s);//getchar();}int n = ans.size();int k = 10;while (n>=0) {n -= k;k *= 10;if (n>=0) num++;}for (int i = 0; i < ans.size(); i++) {cnt++;if (i + 1 == j) {//进位了,就减少一次空格的打印num--;j *= 10;}PrintBlank();cout << cnt << " ";puts(ans[i].c_str());}return 0;
}

D-莲子的物理热力学

分析:

难想的点就在于,想不到可以假设一个[l,r]的区间,这个有点像二分的思想。

第二个难点在于,要想到操作次数是u+v+min(u,v)。但这个通过模拟样例,多少可以获得一点灵感。

教训:看到“极差”,这类字眼,就要想想看二分了。二分就是枚举假设mid是否成立。这题虽然不是二分,但思想和二分很像。

#include<assert.h>
#include<cstdio>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<stdlib.h>
#include<string>
#include<string.h>
#include <stdio.h>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<sstream>
#include<stack>
#include <utility>
#include<map>
#include <vector>#define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define inf 0x3f3f3f3f
#define int long long
//#include <bits/stdc++.h>
typedef long long ll;
#include<iostream>
using namespace std;const int N = 1e6 + 10;
//long long MAX(long long a, long long b) { return a < b ? b : a; }int a[N];
signed main() {   //IOS;int n, m; cin >> n >> m;for (int i = 1; i <= n; i++) {cin >> a[i];}sort(a + 1, a + 1 + n);int j = 1;int ans = 2147483647;for (int i = 1; i <= min(n, m + 1); i++) {j = max(j, i);while ((i - 1) + (n - j) + min(i - 1, n - j) > m) j++;ans = min(ans, a[j] - a[i]);}cout << ans;return 0;
}

http://www.shuangfujiaoyu.com/news/34397.html

相关文章:

  • 深圳做网站联系电话沈阳专业网站seo推广
  • 电子商务平台方案优化工具箱
  • 做免费的网站教程最近的新闻大事20条
  • 做视频哪个网站收入高搜索引擎查询
  • 网站制作费优化网站平台
  • 爬虫代理ip购买欧美seo查询
  • 怎么自己做礼品网站公司seo
  • 用新华做网站名是否侵权网络营销经典失败案例
  • 手机网站怎么搜索引擎设计网站大全
  • wordpress聊天长春网站优化咨询
  • 专门做情侣装的网站网上做广告怎么收费
  • 当地自己的淘宝网站怎么做关键词在线下载
  • 免费网页空间2023北京seo费用是多少
  • 模板网站制作公司今天的新闻大事10条
  • wordpress不间断音乐网站排名优化怎样做
  • 郑州制作网站哪家好怎样把产品放到网上销售
  • 精品课网站建设国产免费crm系统有哪些
  • 租服务器搜索引擎优化的主要内容
  • 网站建设的流程图b2b网站源码
  • 网站开发工具哪个好品牌推广包括哪些内容
  • 什么网站可以免费做兼职百度指数明星搜索排名
  • 淘宝优惠券网站建设线上营销推广方法
  • wordpress泛域名解析seo是指什么职位
  • 软件班级网站建设主题关键词筛选工具
  • 门户网站营销怎么做软文推广收费
  • 网站开发文档管理工具电商关键词排名优化怎么做?
  • wordpress自主更新大连seo顾问
  • h5免费制作平台哪个好湖南seo网站开发
  • 开发一款彩票app需要多少钱正规seo排名外包
  • wordpress+日文模版徐州seo外包公司