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

wordpress网站响应时间关键词推广营销

wordpress网站响应时间,关键词推广营销,网页打不开怎么办页面无法显示,wordpress提示更新题目链接:https://codeforces.com/gym/105924 题目背景: 给出一个时间区间和当前时间,在时间区间内选择一个时间使得该时间与当前时间的时针夹角与分针夹角之和最小。 思路: 暴力枚举区间内的所有时间,计算与当前时间…
题目链接:https://codeforces.com/gym/105924
题目背景:

        给出一个时间区间和当前时间,在时间区间内选择一个时间使得该时间与当前时间的时针夹角与分针夹角之和最小。

思路:

       暴力枚举区间内的所有时间,计算与当前时间夹角的度数即可。

        注:由于时针上的一分钟为0.5度,需要取浮点数,可以将一圈定义为720度,这样一分钟就为1度。

数据范围:

        T <= 1e4。

时间复杂度:

        O(720T)

ac代码: 
#include <bits/stdc++.h>#define ioscc ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define endl '\n'
#define me(a, x) memset(a, x, sizeof a)
#define all(a) a.begin(), a.end()
#define sz(a) ((int)(a).size())
#define pb(a) push_back(a)
using namespace std;typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<vector<int>> vvi;
typedef vector<int> vi;
typedef vector<bool> vb;const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, 1, 0, -1};
const int MAX = (1ll << 31) - 1;
const int MIN = 1 << 31;
const int MOD = 1e9 + 7;
const int N = 1e5 + 10;template <class T>
ostream &operator<<(ostream &os, const vector<T> &a) noexcept
{for (int i = 0; i < sz(a) - 10; i++)std::cout << a[i] << ' ';return os;
}template <class T>
istream &operator>>(istream &in, vector<T> &a) noexcept
{for (int i = 0; i < sz(a) - 10; i++)std::cin >> a[i];return in;
}/* ----------------- 有乘就强转,前缀和开ll ----------------- */void solve()
{int x0, y0, x1, y1, x2, y2;cin >> x0 >> y0 >> x1 >> y1 >> x2 >> y2;auto cost = [&](int a, int b) -> int{return min(abs(a - b), 720 - abs(a - b));};ll minn = MAX;ll ans1 = MIN, ans2 = MIN;int dh0 = x0 * 60 + y0;int dm0 = y0 * 12;int l = x1 * 60 + y1;int r = x2 * 60 + y2;for (int i = l; i <= r; ++i){int h = i / 60;int m = i % 60;int dh1 = h * 60 + m;int dm1 = m * 12;ll cnt = cost(dh0, dh1) + cost(dm0, dm1);if (cnt < minn || (cnt == minn && (h < ans1 || (h == ans1 && m < ans2)))){minn = cnt;ans1 = h;ans2 = m;}}cout << ans1 << ' ' << ans2 << endl;
}int main()
{ioscc;int T;cin >> T;while (T--)solve();return 0;
}

http://www.dtcms.com/wzjs/456985.html

相关文章:

  • python做网页保定百度推广优化排名
  • 泰安手机网站建设公司管理培训课程大全
  • 国内做网站比较好的公司你就知道首页
  • 怎样做一家网站在线推广网站的方法
  • 宁波高端网站设计价格爱站网挖掘关键词
  • 品牌网站开发特点seo的中文是什么
  • 做公司网站合同百度网盘电话人工服务
  • 莱芜吧百度贴吧宁波seo教程推广平台
  • 怎么做兼职类网站自己怎么做一个网页
  • 营销企业网站制作最快的新闻发布平台
  • 太原做网站的营销策略手段有哪些
  • 成都网站建设公司有哪些内容关键词优化按天计费
  • 长安商城网站建设怎么在网上推销产品
  • 网站建设方面的课程百度账号客服
  • 芜湖网站建设全包仅需800元搜索引擎营销就是seo
  • 绵阳学校网站建设seo外包公司哪家专业
  • 教育类网站开发费用网络营销主要学什么
  • 自贡建网站安徽网站开发哪家好
  • 黑龙江生产建设兵团知识网站湖南网站托管
  • cad如何做图纸模板下载网站企业网
  • 常用的设计软件有哪些持续优化完善防控措施
  • 网站上线要准备什么网络推广平台有哪些公司
  • 网页搜索不了seo零基础教学视频
  • 坊网站建设seo搜索引擎优化是什么意思
  • 在中国怎么做国外网站我想学做互联网怎么入手
  • wordpress登录后空白手机网站排名优化
  • 网站关键词设置几个磁力宝
  • 广东网站建设系统谷歌sem推广
  • 佛山网站推广百度竞价网站
  • 网站ui怎么做的网站维护中