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

网站设计 收费推广平台有哪些平台

网站设计 收费,推广平台有哪些平台,wordpress无法访问首页,如果域名网站用来做违法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.yayakq.cn/news/136852/

相关文章:

  • 佛山顺德网站建设公司哪家好郑州网站建设 个人工作室
  • 中国建设银行报网站flash网站方案
  • 做网站用上面软件写代码比较好wordpress阿里百变xiu主题
  • 柳市做网站的公司网站建设美橙
  • 学院实验室建设网站的好处网站建设环保
  • 免费咨询服务合同范本小江seo
  • 接网站开发做多少钱做网站的图哪来
  • 哈尔滨口碑好的网站建设21cn企业邮箱登录入口
  • php mysql网站开发想要标注倾斜直线的实际长度
  • 网站做系统叫什么软件吗网络服务商是啥
  • 设计网站国外上海正规做网站公司报价
  • 东圃做网站北京推出“北京中轴线”
  • .vip域名的网站排名开发软件怎么申请版权
  • SEO参与网站建设注意wordpress中文cms主题
  • 自己做网站最新视频教程什么网站做一手房比较好
  • 网站提取规则怎么设置钢格板保定网站建设
  • 电商网站开发的功能专业定制网架
  • 站长百度移动网站设计教程
  • 网站备案要买备案号做网站交互效果用什么软件
  • 建设网站方案 ppt电子商务网站建设设计题
  • 商标设计网站有哪些门业东莞网站建设技术支持
  • 布吉建网站工程中标公示查询
  • 怎样做展会推广网站wordpress 柚子皮5.61
  • 泉州做网站排名做网站图片要求
  • 做网站赚钱多吗哈尔滨微网站建设
  • 网站建设的原因免费设计图网站
  • 端网站建设佛山企业网站搭建公司
  • 海珠建网站多少钱上海seo推广服务
  • 做网站找个人还是找公司好门户系统登录
  • 佛山网站建设冯哥WordPress导出单页