CodeForces 599A Patrick and Shopping
水题。每种情况取最小值即可。
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std; long long d1,d2,d3; int main()
{
scanf("%lld%lld%lld",&d1,&d2,&d3);
long long X,Y,Z;
X=min(d1,d2+d3);
Y=min(d2,d1+d3);
Z=min(d3,d1+d2);
long long ans=min(*X+*Y,X+Y+Z);
printf("%lld\n",ans);
return ;
}
CodeForces 599A Patrick and Shopping的更多相关文章
- [cf 599A]Patrick and Shopping
傻逼题,但是我还是wa了一发. #include <iostream> using namespace std; int main() { long long a,b,c,Ans=0x7f ...
- Codeforces Round #332 (Div. 2) A. Patrick and Shopping 水题
A. Patrick and Shopping Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/5 ...
- Codeforces Round #332 (Div. 2)A. Patrick and Shopping 水
A. Patrick and Shopping Today Patrick waits for a visit from his friend Spongebob. To prepare for ...
- Patrick and Shopping
Patrick and Shopping 今天 Patrick 等待着他的朋友 Spongebob 来他家玩.为了迎接 Spongebob,Patrick 需要去他家附近的两家商店 买一些吃的.他家 ...
- 【CodeForces 599A】D - 特别水的题4- Patrick and Shopping
Description meter long road between his house and the first shop and a d2 meter long road between h ...
- Educational Codeforces Round 12 B. Shopping 暴力
B. Shopping 题目连接: http://www.codeforces.com/contest/665/problem/B Description Ayush is a cashier at ...
- Codeforces Round #332 (Div. 2)
水 A - Patrick and Shopping #include <bits/stdc++.h> using namespace std; int main(void) { int ...
- Educational Codeforces Round 47 (Div 2) (A~G)
目录 Codeforces 1009 A.Game Shopping B.Minimum Ternary String C.Annoying Present D.Relatively Prime Gr ...
- Codeforces Gym 100803C Shopping 贪心
Shopping 题目连接: http://codeforces.com/gym/100803/attachments Description Your friend will enjoy shopp ...
随机推荐
- mac及windows下安装ss实现***
官网下载shadowsock(mac/windows都是下面地址,页面会根据当前系统自动判断所下载的包) https://sourceforge.net/projects/shadowsocksgui ...
- k8s部署测试实例
查看运行中pod,并运行一个容器 [root@mast-1 k8s]# kubectl get pods No resources found. [root@mast-1 k8s]# kubectl ...
- Open Cascade创建自己的MFC文档程序
项目初始设置在Visual studio中创建一个单文档MFC项目(本例以MFCTest为名称): 在项目属性的VC++页面设置包含目录.库目录,在链接器的输入中添加OCC库目录下的所有.lib文件名 ...
- 阿里云首次安装和部署nginx
1.执行yum命令安装依赖 yum -y install pcre* yum -y install openssl* 2.下载nginx //如果没有安装wget,下载已编译版本 yum instal ...
- VS打开文件,解决方案资源管理器自动定位到文件位置
打开 工具-->选项-->项目和解决方案-->常规,勾选“在解决方案资源管理器中跟踪活动项”
- luogu P1462 通往奥格瑞玛的道路--spfa+二分答案
P1462 通往奥格瑞玛的道路 题目背景 在艾泽拉斯大陆上有一位名叫歪嘴哦的神奇术士,他是部落的中坚力量 有一天他醒来后发现自己居然到了联盟的主城暴风城 在被众多联盟的士兵攻击后,他决定逃回自己的家乡 ...
- linux wget变成000权限
今天使用wget下载文件时出现:-bash: /usr/bin/wget: 权限不够. 查看 /usr/bin/wget 的权限为: ---------- 1 root root 357400 3月 ...
- tomcat域名配置
修改tomcat目录下的web配置文件 vim conf/server.xml 在host标签内添加 <Context path="bbs" docBase="/a ...
- 【Mysql数据库】知识点总结
本文转载自:http://www.cnblogs.com/tonghun/p/7191131.html 一 数据库常用操作 mysql -u+username -p+password:登陆数据库管理系 ...
- markdown pad激活
<iframe src="></iframe> ---恢复内容开始--- 注册码 Soar360@live.com GBPduHjWfJU1mZqcPM3BikjYK ...