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的更多相关文章

  1. 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 ...

  2. CodeForces 144B Meeting

    暴力. 题目只要求计算边上的点就可以了,一开始没看清题意,把内部的也算进去了.内部的计算可以延迟标记一下,但这题没有必要. #include<map> #include<set> ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. Jury Meeting CodeForces - 854D

    Jury Meeting CodeForces - 854D 思路:暴力枚举会议开始的那一天(只需用所有向0点飞的航班的那一天+1去枚举即可),并计算所有人此情况下去0点和从0点出来的最小花费. 具体 ...

  8. Codeforces 420 B. Online Meeting

    B. Online Meeting time limit per test 1 second memory limit per test 256 megabytes input standard in ...

  9. Jury Meeting CodeForces - 854D (前缀和维护)

    Country of Metropolia is holding Olympiad of Metrpolises soon. It mean that all jury members of the ...

随机推荐

  1. jboss-eap-6.2修改端口号

    最近要改版一个项目,用来配合日常工作使用,需要在服务器上放多个jboss,那么就需要修改jboss的端口,如果服务器上配置了JBOSS_HOME,需要先删除,否则配置修改不会生效,会依然用老的jbos ...

  2. rsync 3.1.3

    rsyncd.conf 2018年1月28日 rsyncd配置(5) 2018年1月28日 姓名 rsyncd.conf配置rsync守护进程的方式在file for 概要 rsyncd.conf 描 ...

  3. oralce 创建表空间 和 查询进程

    -- Create the user create user lesdba identified by les_321 default tablespace USERS temporary table ...

  4. Scrapy下载器中间件用法示例

    1.爬虫文件httpbin.py # -*- coding: utf-8 -*- import scrapy class HttpbinSpider(scrapy.Spider): name = 'h ...

  5. discourse论坛迁移

    在源设备的操作备份数据文件tar -czvf discoursefile716.tar.gz /var/discourse然后把此discoursefile716.tar.gz文件传到需要迁移的设备上 ...

  6. OSI 7层模型和 TCP/IP 5层模型

    网络协议通常分不同层次进行开发,每一层分别负责不同的通行功能. 两种参考模型 OSI 和 TCP/IP, OSI 先有模型后有协议,TCP/IP 则相反. OSI 7层模型 - 应用层 - 表示层 - ...

  7. Codeforces 432D Prefixes and Suffixes (KMP、后缀数组)

    题目链接: https://codeforces.com/contest/432/problem/D 题解: 做法一: KMP 显然next树上\(n\)的所有祖先都是答案,出现次数为next树子树大 ...

  8. 如何实现在scrapy调试爬虫

    # -*- coding:utf-8 -*- from scrapy.cmdline import execute import sys import os '''在爬虫文件夹下面自定义一个main. ...

  9. Python图像处理库PIL中图像格式转换(一)

    在数字图像处理中,针对不同的图像格式有其特定的处理算法. 所以,在做图像处理之前,我们须要考虑清楚自己要基于哪种格式的图像进行算法设计及事实上现.本文基于这个需求.使用python中的图像处理库PIL ...

  10. @SpringBootApplication注解

    @SpringBootApplication注解表明了SpringBoot的核心功能,即自动配置. @SpringBootApplication(主配置类): @SpringBootConfigura ...