Codeforces #332 A. Laurenty and Shop (枚举)

原创 2015年11月21日 03:10:19

题意:

sa,b;  l(s,a)=d1,l(s,a)=d2,l(a,b)=d3,ss

分析:

4,

代码:

//
//  Created by TaoSama on 2015-11-21
//  Copyright (c) 2015 TaoSama. All rights reserved.
//
//#pragma comment(linker, "/STACK:1024000000,1024000000")
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <set>
#include <vector>

using namespace std;
#define pr(x) cout << #x << " = " << x << "  "
#define prln(x) cout << #x << " = " << x << endl
const int N = 1e5 + 10, INF = 0x3f3f3f3f, MOD = 1e9 + 7;

int d1, d2, d3;

int main() {
#ifdef LOCAL
    freopen("C:\\Users\\TaoSama\\Desktop\\in.txt", "r", stdin);
//  freopen("C:\\Users\\TaoSama\\Desktop\\out.txt","w",stdout);
#endif
    ios_base::sync_with_stdio(0);

    while(cin >> d1 >> d2 >> d3) {
        int ans = min(d1 + d2 + d3, (d1 + d2) * 2);
        ans = min(ans, 2 * (d1 + d3));
        ans = min(ans, 2 * (d2 + d3));
        cout << ans << '\n';
    }
    return 0;
}
版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

Codeforces 586B Laurenty and Shop【思维+模拟】

B. Laurenty and Shop time limit per test 1 second memory limit per test 256 megabytes inp...

Laurenty and Shop(前序和,后序和的应用)

B. Laurenty and Shop time limit per test 1 second memory limit per test 256 megabytes input st...

Codeforces Round #332 (Div. 2) A. Patrick and Shopping

A. Patrick and Shopping time limit per test 1 second memory limit per test 256 megabytes...

【Codeforces Round 332 (Div 2)D】【数学 公式推导】Spongebob and Squares 正方形数量恰好为x个的所有大矩形

D. Spongebob and Squares time limit per test 2 seconds memory limit per test 256 megabyt...

【Codeforces Round 332 (Div 2)B】【扭转题意 位置映射】Spongebob and Joke 给b[]中的每个数找f[]中的位置

B. Spongebob and Joke time limit per test 2 seconds memory limit per test 256 megabytes ...

Codeforces Round #332 (Div. 2)_B. Spongebob and Joke

B. Spongebob and Joke time limit per test 2 seconds memory limit per test 256 megabytes ...

【Codeforces Round 332 (Div 2)A】【水题】A. Patrick and Shopping 遍历三元环的最小成本

A. Patrick and Shopping time limit per test 1 second memory limit per test 256 megabytes...

Codeforces Round #332 (Div. 2) D. Spongebob and Squares

Spongebob is already tired trying to reason his weird actions and calculations, so he simply asked y...

Codeforces Round #332 (Div. 2) D. Spongebob and Squares详解

Codeforces Round #332 (Div. 2) D. Spongebob and Squares

Codeforces #332 B. Spongebob and Joke (思路)

题意: 给定长度为n的序列f,长度为m的序列b,且fai=b[i],求长度为m的序列给定长度为n的序列f, 长度为m的序列b, 且f_{a_i}=b[i], 求长度为m的序列 多解输出Amb...
  • lwt36
  • lwt36
  • 2015-11-21 03:15
  • 286
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)