CodeForces A. Meeting of Old Friends
2019-05-30
20:19:57
加油!!!
sort(a + 1, a + 5);
卡了一会儿
#include <bits/stdc++.h>
using namespace std;
typedef long long ll; int main()
{
ll a[], e;
ll sum = ;
for (int i = ; i <= ; i++)
{
scanf("%lld ", &a[i]);
}
scanf("%lld", &e);
if (a[] < a[] || a[] < a[])
{
cout << ;
return ;
}
else
{
sort(a + , a + );
sum = a[] - a[] + ;
if (e >= a[] && e <= a[])
{
sum--;
}
cout << sum << endl;
} return ;
}
CodeForces A. Meeting of Old Friends的更多相关文章
- Codeforces 714A Meeting of Old Friends
A. Meeting of Old Friends time limit per test:1 second memory limit per test:256 megabytes input:sta ...
- CodeForces 144B Meeting
暴力. 题目只要求计算边上的点就可以了,一开始没看清题意,把内部的也算进去了.内部的计算可以延迟标记一下,但这题没有必要. #include<map> #include<set> ...
- codeforces 782B The Meeting Place Cannot Be Changed (三分)
The Meeting Place Cannot Be Changed Problem Description The main road in Bytecity is a straight line ...
- Codeforces Round #375 (Div. 2) A. The New Year: Meeting Friends 水题
A. The New Year: Meeting Friends 题目连接: http://codeforces.com/contest/723/problem/A Description There ...
- Codeforces Round #371 (Div. 2) A. Meeting of Old Friends 水题
A. Meeting of Old Friends 题目连接: http://codeforces.com/contest/714/problem/A Description Today an out ...
- Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) B. The Meeting Place Cannot Be Changed
地址:http://codeforces.com/contest/782/problem/B 题目: B. The Meeting Place Cannot Be Changed time limit ...
- Jury Meeting CodeForces - 854D
Jury Meeting CodeForces - 854D 思路:暴力枚举会议开始的那一天(只需用所有向0点飞的航班的那一天+1去枚举即可),并计算所有人此情况下去0点和从0点出来的最小花费. 具体 ...
- Codeforces 420 B. Online Meeting
B. Online Meeting time limit per test 1 second memory limit per test 256 megabytes input standard in ...
- Jury Meeting CodeForces - 854D (前缀和维护)
Country of Metropolia is holding Olympiad of Metrpolises soon. It mean that all jury members of the ...
随机推荐
- Mysql 在Linux下的安装
1.获取mysql源码 wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.49.tar.gz 3.添加mysql用户和用户组,创建 ...
- Linux 下phpstudy的安装使用补充说明
(1)使用方法 在终端中使用sudo 或者 使用管理员账号运行 phpstudy start 开启 (2)命令列表: phpstudy start | stop | restart 开启 ...
- join 和 left join 和 right join的区别?
join等价于 inner join 是内连接 ,返回两个表都有的符合条件的行. left join 是左连接,返回坐表中所有的行以及右表中符合条件的行. right join右连接,是返回右表中所有 ...
- 字符串问题:去掉字符串中连续出现 k 个 0 的子串
[题目] 给定一个字符串 str 和 一个整数 k, 如果 str 中正好有连续 k 个 ‘0’ 字符出现时,把 k 个连续的 ‘0’ 字符去除,返回处理后的字符串. [举例] str="A ...
- Vue中.sync修饰符
Vue 中 sync的作用 <FatherComponent :a.sync = 'b'><FatherComponent /> 子组件中emit('update:a',... ...
- Git ——Tool
Git: 何为Git: Git 是一个可以实时记录文件变化.维护文件的安全的一个仓库! Git仓库是由** Linux 系统之父 Linus Torvalds ** 创建的一个开源 的软件!Githu ...
- 第一节:web爬虫之requests
Requests库是用Python编写的,并且Requests是一个优雅而简单的Python HTTP库,在使用Requests库时更加方便,可以节约我们大量的工作,完全满足HTTP测试需求.
- vue 瀑布流实现
<div class="myWrite" v-if="list.length==0"> - 这个福宝有点懒哦 - </div> < ...
- Mysql学习总结(40)——MySql之Select用法汇总
一.条件筛选 1.数字筛选:sql = "Select * from [sheet1$] Where 销售单价 > 100" 2.字符条件:sql = "Selec ...
- ZOJ 3199 Longest Repeated Substring
Longest Repeated Substring Time Limit: 5000ms Memory Limit: 32768KB This problem will be judged on Z ...