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 ...
随机推荐
- Grid 拖拽布局实现
最近有个需求需要实现自定义首页布局,需要将屏幕按照 6 列 4 行进行等分成多个格子,然后将组件可拖拽对应格子进行渲染展示. 示例 对比一些已有的插件,发现想要实现产品的交互效果,没有现成可用的.本身 ...
- 【WCH以太网接口系列芯片】基于CH395的组播请求(IGMP)
在上一篇文章中,我们通过直连电脑测试了CH395在组播环境中进行数据的收发,但在实际的使用场景中更多的是将CH395接入局域网环境中.因此,我们需要使用到一个协议--IGMP(Internet Gro ...
- [ABC272G] Yet Another mod M
Problem Statement You are given a sequence $A=(A_1,A_2,\dots,A_N)$ of length $N$ consisting of posit ...
- [ABC233G] Strongest Takahashi
Problem Statement There is a $N \times N$ grid, with blocks on some squares. The grid is described b ...
- 【matlab混沌理论】1.3.双摆杆基本模型
双摆杆是混沌理论的典型运动模型之一.涉及重力加速度.摆杆长度和质量. 1.双摆杆的摆角分析 input: % 已知物理参数 L1 = 5;L2 = 3; %两摆杆长度和质量 m1 = 3;m2 = 5 ...
- vue-test --------事件修饰符
<template> <h3>事件修饰符</h3> <a @click="clickHandle" href="www.baid ...
- 国产化软件新浪潮: spring 改造替代...
中午看了篇<国产化软件新浪潮:jdk redis mysql tomcat nginx改造替代品及信创名录> 想给它补充个 spring 改造替代:) 七.Spring 替代品 - Sol ...
- spring cloud生态中Feign、Ribbon、loadbalancer的一些历史
背景 本意是想写个feign中loadbalancer组件和nacos相遇后,一个兼容相关的问题,后面发现Feign这套东西很深,想一篇文章写清楚很难,就先开一篇,讲历史. Feign.OpenFei ...
- 轻量型 Web SCADA 组态软件 TopLink
图扑物联 发布了一款工业物联网边缘侧应用场景的轻量型 Web SCADA 组态软件 Iotopo TopLink.该产品采用 B/S 架构,提供 Web 管理界面,软件包大小仅 23MB,无需安装客户 ...
- Celery将任务分发到不同的队列,交给不同的Worker处理
https://docs.celeryq.dev/en/stable/userguide/routing.html#routing-tasks https://blog.csdn.net/wangle ...