Codeforce:723A. The New Year: Meeting Friends (水题)
题意:有三个好朋友的家都住在x轴的不同坐标,问新年的时候三个朋友之间问候走的最短距离
max{(a,b,c)} - min{(a,b,c)} 即可
编译器由 VS2017 切换到VScode使用,纪念下
Examples
input
7 1 4
output
6
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c; cin>>a>>b>>c;
cout<< max({a,b,c}) - min({a,b,c});//新版本C++的max,min内置了3个数比较的temple
return 0;
}
Codeforce:723A. The New Year: Meeting Friends (水题)的更多相关文章
- CodeForces 723A The New Year: Meeting Friends (水题)
题意:给定 3 个数,求其中一个数到另外两个数之间的最短距离. 析:很明显选中间那个点了. 代码如下: #pragma comment(linker, "/STACK:1024000000, ...
- 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 ...
- Codefoces 723A The New Year: Meeting Friends
A. The New Year: Meeting Friends time limit per test:1 second memory limit per test:256 megabytes in ...
- 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 723A : The New Year: Meeting Friends
Description There are three friend living on the straight line Ox in Lineland. The first friend live ...
- codeforce A. 2Char(水题,暴力)
今晚发了个蛇精病,然后CF了,第一题这好难啊,然而水题一个,暴力飘过. 链接http://codeforces.com/contest/593/problem/A: 题意比较难懂吗?傻逼百度都翻译不对 ...
- HDOJ 2317. Nasty Hacks 模拟水题
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Tota ...
- ACM :漫漫上学路 -DP -水题
CSU 1772 漫漫上学路 Time Limit: 1000MS Memory Limit: 131072KB 64bit IO Format: %lld & %llu Submit ...
- ytu 1050:写一个函数,使给定的一个二维数组(3×3)转置,即行列互换(水题)
1050: 写一个函数,使给定的一个二维数组(3×3)转置,即行列互换 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 154 Solved: 112[ ...
- [poj2247] Humble Numbers (DP水题)
DP 水题 Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The se ...
随机推荐
- 记录一次 postgresql 优化案例( 嵌套循环改HASH JOIN )
今天同事给我一条5秒的SQL看看能不能优化. 表数据量: select count(1) from AAAA union all select count(1) from XXXXX; count - ...
- [ARC158D] Equation
Problem Statement You are given a positive integer $n$, and a prime number $p$ at least $5$. Find a ...
- MybatisPlus的一些高级特性
1.MybatisPlus多数据源配合 导入相关依赖 <dependency> <groupId>com.baomidou</groupId> <artifa ...
- eclipse工具使用
eclipse下载 官网下载:https://www.eclipse.org/downloads/packages/ 打开后,找到Eclipse IDE for Java Developers点击进入 ...
- 子类Dog根据自己的需要,重写了Animal方法
子类Dog根据自己的需要,重写了Animal方法 package com.guoba.method; class Animal{ public void move(){ System.out.prin ...
- MOSS对话式大型语言模型
MOSS是复旦大学自然语言处理实验室发布的一种类似于ChatGPT的会话语言模型.MOSS能够按照用户的指示执行各种自然语言任务,包括回答问题.生成文本.摘要文本.生成代码等.MOSS还能够挑战错误的 ...
- ElasticSearch之cat data frame analytics API
命令样例如下: curl -X GET "https://localhost:9200/_cat/ml/data_frame/analytics?v=true&pretty" ...
- 痞子衡嵌入式:Farewell, 我的写博故事2023
-- 题图:苏州虎丘塔 2023 年的最后一天,照旧写个年终总结.昨晚和同门师兄弟一起吃饭,有个师弟告诉痞子衡,微博上一个拥有 22.3W 粉丝的嵌入式同行今年 4 月发过一个吐槽微博,说恩智浦 MC ...
- Windows Server 2012 R2 远程桌面服务部署指南
著作权归作者所有:来自51CTO博客作者mabofeng的原创作品,请联系作者获取转载授权,否则将追究法律责任 01-Windows Server 2012 R2 远程桌面服务部署指南文章来源:htt ...
- DVWA File Inclusion(文件包含)全等级
File Inclusion(文件包含) 目录: File Inclusion(文件包含) 前言 PHP伪协议 1.Low get webshell 本地文件包含 远程文件包含 2.Medium 3. ...