Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	return n
}

func main() {
	sc.Split(bufio.ScanWords)

	a, b, c, d, e := nextInt(), nextInt(), nextInt(), nextInt(), nextInt()
	x := a
	if b < x {
		x = b
	}
	if c < x {
		x = c
	}
	y := d
	if e < y {
		y = e
	}

	fmt.Println(x + y - 50)
}

C++: #include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back

int main() {
    vi a,b;
    rep(i,3){
        int x;
        cin>>x;
        a.pb(x);
    }
    rep(i,2){
        int x;
        cin>>x;
        b.pb(x);
    }
    
    sort(all(a));
    sort(all(b));
    
    cout<<a[0]+b[0]-50<<endl;
    
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit
#include <cstdio>	// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>	// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()
#define DEBUG 0

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
string FILE_NAME = "testcase.lunch";
string NAME;
string itos (int n )
{
	stringstream ss;
	ss << n;

	return ss.str();
}

int main()
{
//	cut here before submit 
#if DEBUG
	NAME = FILE_NAME;
	int CNT = 1;
	NAME += itos (CNT );
	while (freopen (NAME.c_str() , "r", stdin ) != NULL ) {
#endif
	vector<int> pasta (3, 0 );
	rep (i, 3 ){
		cin >> pasta[i];
	} // end rep
	sort (ALL (pasta ) );
	vector<int> juice (2, 0 );
	rep (i, 2 ){
		cin >> juice[i];
	} // end rep
	sort (ALL (juice ) );
	cout << pasta[0] + juice[0] - 50 << endl;

#if DEBUG
	CNT++;	// cut here before submit
	NAME = FILE_NAME;
	NAME += itos (CNT );
	} // end loop; cut here before submit
#endif			
	return 0;
}

C++: #include<iostream>
using namespace std;

int min( int a, int b )
{
    if( a < b )
        return a;
    else
        return b;
}

int main()
{
    int a, b, c, d, e;

    cin >> a >> b >> c >> d >> e;

    cout << min( min( a, b ), ( b, c ) ) + min( d, e ) - 50 << endl;

    return 0;
}

C++: #include <iostream>
using namespace std;

int main()
{
	int p1,p2,p3;
	int j1,j2;
	int min=0;

	cin >> p1 >> p2 >> p3 >> j1 >> j2;

	min = p1+j1;

	if(min > p1+j2)
		min = p1+j2;

	if(min > p2+j1)
		min = p2+j1;

	if(min > p2+j2)
		min = p2+j2;

	if(min > p3+j1)
		min = p3+j1;

	if(min > p3+j2)
		min = p3+j2;

	cout << min-50 << endl;

	return 0;
}

C++: // 2014/12/10 Tazoe

#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int p1, p2, p3, j1, j2;
	cin >> p1;
	cin >> p2;
	cin >> p3;
	cin >> j1;
	cin >> j2;

	int p = min(min(p1, p2), p3);
	int j = min(j1, j2);

	cout << p+j-50 << endl;

	return 0;
}

C++: #include <stdio.h>
int main(){
int a,b,temp;
scanf("%d",&a);
scanf("%d",&temp):
if(temp<a)a=temp;
scanf("%d",&temp):
if(temp<a)a=temp;
b=a;
scanf("%d",&a);
scanf("%d",&temp):
if(temp<a)a=temp;
printf("%d\n",a+b-50);
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>

using namespace std;

int main(){
	int p1;
	int p2;
	int p3;
	int j1;
	int j2;
	cin >> p1 >> p2 >> p3 >> j1 >> j2;
	cout << min({ p1, min (p2, p3)  }) + min({ j1, j2 }) - 50 << endl;
	getchar();
	getchar();
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<long long> vll;
typedef pair<int,int> pint;
typedef pair<long long, long long> pll;

#define MP make_pair
#define PB push_back
#define ALL(s) (s).begin(),(s).end()
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P) 
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P) 
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P) 
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s; }



int a, b, c, d, e;

int main() {
    while (cin >> a >> b >> c >> d >> e) {
        int h1 = min(min(a, b), c), h2 = min(d, e);
        cout << h1 + h2 - 50 << endl;
    }
    return 0;
}

C++: #include<bits/stdc++.h>

using namespace std;

main(){
	int a,b,c,d,e;
	int k=0;
	int l=0;
	cin >>a >>b >>c >>d >>e;
	if (a < b && a < c){
		k=k+a;
	}
	else if (b < a && b < c){
		k=k+b;
	}
	else{
		k=k+c;
	}
	if (e > d){
		l=l+d;
	}
	else {
		l=l+e;
	}
	int g=k+l-50;
	printf("%d\n",g);
	}

C++: #include <stdio.h>

int main(void) {
  int a, min1 = 9999, min2 = 9999, i;
  for(i = 0; i < 3; ++i) {
    scanf("%d", &a);
    if(min1 > a) min1 = a;
  }
  for(i = 0; i < 2; ++i) {
    scanf("%d", &a);
    if(min2 > a) min2 = a;
  }
  printf("%d\n", min1 + min2 - 50);
  return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>

using namespace std;

int main(){
	int p1;
	int p2;
	int p3;
	int j1;
	int j2;
	cin >> p1 >> p2 >> p3 >> j1 >> j2;
	int p = min({ p1, p2, p3 });
	int j = min({ j1, j2 });
	cout << p + j - 50<< endl;
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

/*-------------------------------*/
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define RFOR(i, a, b) for(int i = (b) - 1; i >= (a); i--)
#define REP(i, n) for(int i = 0; i < (n); i++)
#define rep(i, n) for(int i = 0; i < (n); i++)
#define RREP(i, n) for(int i = (n) - 1; i >= 0; i--)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
#define all(i) (i).begin(),(i).end()
#define pb push_back
#define mp make_pair

typedef long long ll;
typedef pair<int, int> pint;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef vector<long long> llv;
typedef vector<pint> vpint;

/*-------------------------------*/

int main(void)
{
  int p, minp, j, minj;
  cin >> p;
  minp = p;

  rep(i, 2){
    cin >> p;
    if (minp > p) minp = p;
  }
  cin >> j;
  cin >> p;
  minj = min(j, p);

  cout << minj + minp - 50 << endl;

  return 0;
}

C++: #include <iostream>
#include <algorithm>
int main() {
	int k = 0;
	int a, b, c;
	int x, y;
	std::cin >> a >> b >> c >> x >> y;
	k+=std::min(c, std::min(a, b));
	k += std::min(x, y);
	std::cout << k - 50 << std::endl;
}