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 ...
随机推荐
- CentOS6.9下NFS配置说明(转载)
NFS是Network File System的缩写,即网络文件系统.它的主要功能是通过网络(一般是局域网)让不同的主机系统之间可以共享文件或目录.NFS客户端可以通过挂载(mount)的方式将NFS ...
- 新建python的虚拟环境
1.mkvirutalenv --python=E:\Users\00\AppData\Local\Programs\Python\Python37-32\python.exe article_spi ...
- EAS之校验检查
先了解一下权限接口类提供的有关权限项检查的方法public boolean hasFunctionPermission(IObjectPK userPK,IObjectPK orgPK,String ...
- NTP测试1
ntp server A : 10.101.75.8 B : 10.101.75.38 B: [root@r10n16313.sqa.zmf /home/ahao.mah] #cat /etc/ntp ...
- 从0开始复习JS---1、函数复习
1. 写一个函数,实现对数字数组的排序. function get_order(array){ for(var i = 0; i <array.length-1; i++){ for(var j ...
- (C/C++学习)11.随机数组的快速查找
说明:利用随机函数生成一个随机数组,然后对数组进行排列,再利用二分查找快速查找一个数. 一.生成随机数组 time_t ts; //等价于long ts; unsigned int num = tim ...
- UID中RUID、EUID和SUID的区别
看UNIX相关的书时经常能遇到这几个概念,但一直没有好好去理清这几个概念,以致对这几个概念一直一知半解.今天好好区分了一下这几个概念并总结如下.说白了这几个UID引出都是为了系统的权限管理. 下面分别 ...
- 1.scrapy爬取的数据保存到es中
先建立es的mapping,也就是建立在es中建立一个空的Index,代码如下:执行后就会在es建lagou 这个index. from datetime import datetime fr ...
- 【codeforces 796A】Buying A House
[题目链接]:http://codeforces.com/contest/796/problem/A [题意] 让你选一个最靠近女票的,且能买的房子; 输出你和你女票的距离; [题解] 枚举 [Num ...
- JavaSE 学习笔记之异 常(十)
异 常: 异常:就是不正常.程序在运行时出现的不正常情况.其实就是程序中出现的问题.这个问题按照面向对象思想进行描述,并封装成了对象.因为问题的产生有产生的原因.有问题的名称.有问题的描述等多个属性信 ...