A. Patrick and Shopping
来源:互联网 发布:数字正则表达式 java 编辑:程序博客网 时间:2024/06/06 09:35
解题说明:水题,求最短距离。
#include<stdio.h>#include <string.h>#include<iostream>#include<algorithm>using namespace std;int min(int a, int b) { return a < b ? a : b;}int main(){ int d1, d2, d3; scanf("%d %d %d", &d1, &d2, &d3); printf("%d\n", min(d1, d2 + d3) + min(d3, d1 + d2) + min(d2, d1 + d3)); return 0;}
0 0
- A. Patrick and Shopping
- 599A Patrick and Shopping
- CF-332-div2-A. Patrick and Shopping
- Codeforces 599A Patrick and Shopping 【水题】
- Codeforces 599 A. Patrick and Shopping
- CodeForces 599A Patrick and Shopping
- CodeForces 599A Patrick and Shopping
- 【CodeForces】[599A]Patrick and Shopping
- CodeForces 599A Patrick and Shopping
- 【Codeforces 599A 】Patrick and Shopping
- Patrick and Shopping(水题)
- Patrick and Shopping
- 【coderorces】Patrick and Shopping
- Patrick and Shopping
- Patrick and Shopping
- Patrick and Shopping
- C - Patrick and Shopping
- Patrick and Shopping
- 使用msvc编译的rustc
- 野人学Android第二弹——照片的拍摄与存储(一)
- C语言实现密码的设置及验证
- Codeforces 599B Spongebob and Joke 【水题】
- 数据库
- A. Patrick and Shopping
- “应试教育的死穴,恰在于堵住了孩子“犯错”空间”——有感
- LeetCode 055 Jump Game
- svn使用发现新问题.
- JavaScript学习之路01_准备
- Android TextView 判断文字内容是否超出显示省略号
- iOS如何实现表格的折叠效果?
- vijos1440 士兵 (排序,模拟)
- js对象形式编码风格