Middle of the Contest
https://codeforces.com/contest/1133/problem/A
题解:先转换为分,然后取平均数,再转回去
/*
*@Author: STZG
*@Language: C++
*/
#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
#include<map>
#include<set>
//#define DEBUG
#define RI register int
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=100000+10;
const int M=100000+10;
const int MOD=1e9+7;
const double PI = acos(-1.0);
const double EXP = 1E-8;
const int INF = 0x3f3f3f3f;
int t,n,m,k,q;
int ans,cnt,flag,temp,sum;
int a[N];
char str;
struct node{};
int main()
{
#ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout);
#endif//ios::sync_with_stdio(false);//cin.tie(0);//cout.tie(0);//scanf("%d",&t);//while(t--){scanf("%d:%d",&n,&m);scanf("%d:%d",&k,&q);int aa=n*60+m;int bb=k*60+q;int mid=(aa+bb)>>1;int ansa=mid/60;int ansb=mid%60;if(ansa<10)printf("0");printf("%d",ansa);printf(":");if(ansb<10)printf("0");printf("%d\n",ansb);//}#ifdef DEBUGprintf("Time cost : %lf s\n",(double)clock()/CLOCKS_PER_SEC);
#endif//cout << "Hello world!" << endl;return 0;
}
Middle of the Contest相关推荐
- Codeforces Round #544 (Div. 3) A.Middle of the Contest
链接:https://codeforces.com/contest/1133/problem/A 题意: 给两个时间点,求中间时间点. 思路: 数学 代码: #include <bits/std ...
- 2021年度训练联盟热身训练赛第二场(ICPC North Central NA Contest 2019,南阳师范学院),签到题ABCDEFGIJ
A. Binarize It,简单枚举 链接:https://ac.nowcoder.com/acm/contest/12794/A 来源:牛客网 题目描述 Professor Boolando ca ...
- Central Europe Regional Contest 2019 J. Saba1000kg (并查集+根号讨论)
链接:https://ac.nowcoder.com/acm/contest/7817/I 来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 262144K,其他语言524 ...
- E. XOR Guessing(Meet in the Middle)
E. XOR Guessing(Meet in the Middle) 先把14位折半一下. 先取100个 高7位都为0的数,就可以确定xxx的高7位, 然后取100个低7位都为0的数,就可以确定xx ...
- cf Educational Codeforces Round 85 (Rated for Div. 2)B. Middle Class
题目链接:https://codeforces.com/contest/1334/problem/B B. Middle Class time limit per test2 seconds memo ...
- [BZOJ2653]middle
[BZOJ2653]middle 题面 一个长度为n的序列a,设其排过序之后为b,其中位数定义为b[n/2],其中a,b从0开始标号,除法取下整.给你一个 长度为n的序列s.回答Q个这样的询问:s的左 ...
- HDOJ 1157 HDU 1157 Who's in the Middle ACM 1157 IN HDU
MiYu原创, 转帖请注明 : 转载自 ______________白白の屋 题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=1157 题目描述: ...
- HDU 6091 - Rikka with Match | 2017 Multi-University Training Contest 5
思路来自 某FXXL 不过复杂度咋算的.. /* HDU 6091 - Rikka with Match [ 树形DP ] | 2017 Multi-University Training Conte ...
- HDU 6051 - If the starlight never fade | 2017 Multi-University Training Contest 2
/* HDU 6051 - If the starlight never fade [ 原根,欧拉函数 ] | 2017 Multi-University Training Contest 2 题意: ...
最新文章
- lLinux网络相关命令,防火墙介绍及相关命令
- 微软免费图书《Introducing Microsoft LINQ》翻译Chapter2.1:C# 3.0 特性(对象初始化表达式\匿名类型\查询表达式)...
- spring源码分析之定时任务概述
- 6、存储函数详解,创建,查看,修改,删除
- canvas学习之粒子动画
- 如何直接强制客户端刷新.js文件
- 【贪心】逃跑(jzoj 1748)
- 在VC中使用MATLAB C++函数库
- 学python能做什么类型的工作-最适合学Python的几类人,有你吗?
- 架构之路 参考MySpace
- Oracle技术之SYS用户对象不支持延迟段
- 因子分析spss怎么做 spss因子分析教程及结果解释
- Windows android adb interface驱动安装失败 ADB interface驱动安装失败解决方法
- 数字集成电路设计流程
- 洛谷 P1359 租用游艇(Floyd, Dijkstra,SPFA)
- 2.5、信道的极限容量!
- nodejs读取图片像素
- java GUI SWING
- 赢得面试 — 天助自助者
- ExcelVBA 之可选参数
热门文章
- php 删除 r n,PHP去除换行符'/r/n'回车换行与PHP_EOL变量的使用
- java 映射类_将数据库类型映射到具体的Java类
- c语言铁道,C语言程序设计(方少卿) 铁道C第8章(修订版).pdf
- wannacry作者捉到了吗_不会阅读空气是情商低吗?如何提升自己的情商?
- python代码用c语言封装_使用C语言扩展Python程序的简单入门指引
- android SharedPreferences实现用户的注册和保存账号密码
- 【小白学习C++ 教程】七、在C++指针声明和指针相关概念
- 超越GPT-3!NormFormer:归一化提高预训练、缓解梯度不匹配
- MindSpore感恩节重磅福利,华为Mate 40E送送送!
- 直播 | KDD 2021论文解读:基于协同对比学习的自监督异质图神经网络