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<stdio.h>
#include<iostream>
using namespace std;
int main(void){
	int p[3],j[2],i,t,a;
	for(i=0;i!=3;i++)
		cin>>p[i];
	for(i=0;i!=2;i++){
		for(a=i;a!=3;a++){
			if(p[i]>p[a]){
				t=p[i];
				p[i]=p[a];
				p[a]=t;
			}
		}
	}
	t=p[0];
	cin>>j[0]>>j[1];
	if(j[0]<j[1])
		t+=j[0];
	else
		t+=j[1];
	cout<<t-50<<endl;
}

C++: #include<iostream>
using namespace std;
int main(){
	int p[3],d[2],n[6],x,y=0,q=5000;
	
	for(int i=0;i<3;i++){cin >> p[i];}
	for(int i=0;i<2;i++){cin >> d[i];}
	for(int i=0;i<3;i++){
		x=p[i];
		for(int i=0;i<2;i++){n[i+y]=x+d[i];}
		y=y+2;
	}
	for(int i=0;i<6;i++){
		if(n[i]<q)q=n[i];
	}
	cout << q-50 << endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int pas,jui,pasta=2000,juice=2000,i;
for(i=0;i<3;i++){
cin>>pas;
if(pas<=pasta)pasta=pas;
}
for(i=0;i<2;i++){
cin>>jui;
if(jui<=juice)juice=jui;
}
cout<<(pasta+juice)-50<<endl;
return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>
#include <queue>
#include <numeric>
#include <climits>
#include <iterator>
#include <iomanip>
#include <stack>
#include <set>
#include <cstdio>
#include <bitset>
#include <functional>
#include <tuple>
#include <list>
#include <deque>
using namespace std;
typedef pair<int, int> P;

#define FOR(i, a, n) for (ll i = (ll)a; i<(ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)

typedef long long ll;
typedef vector<int> VI;



int main() {
    cin.tie(0);
   	ios::sync_with_stdio(false);
    int a, b, c, d, e; cin >> a >> b >> c >> d >> e;
    cout << min(a, min(b, c)) + min(d, e) - 50 << endl;
	return 0;
}

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

int main() {
	int sum = -50;
	int a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;
	sum += min(a, min(b, c)) + min(d, e);
	cout << sum << endl;
}

C++: #include <stdio.h>

main()
{
	int a,b,c,d,e;
	scanf("%d",&a);
	scanf("%d",&b);
	scanf("%d",&c);
	scanf("%d",&d);
	scanf("%d",&e);
	int m,n;
	if (a<b)
		if (a>c) m = c;
		else     m = a;
	else
		if (b>c) m = c;
		else	 m = b;
	if (d<e) n = d;
	else	 n = e;
	int S;
	S = m + n - 50;
	printf("%d",S);
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
typedef vector<string> vstring;
typedef vector<pint> vpint;

struct Edge{int to,from,cost;};

#ifdef DEBUG
#define debug cout
#else
stringstream __ss__;
#define debug __ss__
#endif

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) debug << *i << " "; debug << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

#define rep(i,n) for(int i=0;i<(n);++i)
#define repd(i,n) for(int i=(n)-1;i>=0;i--)
#define repn(i,m,n) for(int i=(m);i<=(n);++i)
#define repnd(i,m,n) for(int i=(n)-1;i>=(m);i--)
#define rep0(i,n) for(i=0;i<(n);++i)
#define all(n) n.begin(),n.end()
#define sz(n) ((int)(n).size())
#define IL for(;;)
#define MP make_pair
#define PB push_back
#define SS stringstream
#define X second
#define Y first
#define PUTLINE debug<<"LINE:"<<__LINE__<<endl;

const int INF = 2147483647/3;
const double EPS = 1e-10;
const double PI = acos(-1.0);

const int dx[]={1,-1,0,0,1,-1,1,-1,0};
const int dy[]={0,0,1,-1,1,-1,-1,1,0};



int main() {
	int a[5];
	rep(i,5)cin>>a[i];
	cout<<min(min(a[0],a[1]),a[2])+min(a[3],a[4])-50<<endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
  int p[3];
  int ju[2];
  int sum=0,min=0;
  
  cin>>p[0]>>p[1]>>p[2];
  cin>>ju[0]>>ju[1];

  min=p[0]+ju[0];
  for(int i=0;i<3;i++){
    for(int j=0;j<2;j++){
      sum=p[i]+ju[j];
      if(min>sum)
        min=sum;
    }
  }

  min-=50;

  cout<<min<<endl;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int A,B,C,D,E;
    cin>>A>>B>>C>>D>>E;
    cout<<(min({A,B,C})+min(D,E)-50)<<endl;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	int a[6];
	int p[3],s[2];
	for(int i=0;i<3;i++)
		cin>>p[i];
	for(int i=0;i<2;i++)
		cin>>s[i];
	for(int i=0;i<6;i++)
		a[i]=p[i%3]+s[i%2]-50;
	for(int i=0;i<5;i++){
        for(int j=5;j>i;j--){
	        if(a[j]<a[j-1]){
	        int t=a[j];
	        a[j]=a[j-1];
	        a[j-1]=t;
	        }
        }
    }
	cout<<a[0]<<endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int i, a, ans, min =10000;
	for (i = 0; i < 3; i++){
		cin >> a;
		if (min > a){
			min = a;
		}
	}
	ans = min - 50;
	min = 10000;
	for (i = 0; i < 2; i++){
		cin >> a;
		if (min > a){
			min = a;
		}
	}
	cout << ans + min;
	return 0;
}

C++: #include<iostream>
#include<algorithm>

using namespace std;

#define Pas 3
#define Jui 2

int main(void){
	
	int pasta[Pas];
	int juice[Jui];
	
	int Min = 10000;
	
	for(int i = 0;i < Pas;i++){
		
		cin >> pasta[i];
		
	}
	
	for(int i = 0;i < Jui;i++){
		
		cin >> juice[i];
		
	}
	
	for(int i = 0;i < Pas;i++){
		
		for(int j = 0;j < Jui;j++)
		 
		 Min = min(Min,pasta[i] + juice[j]);
		 
	}
	
	cout << Min - 50 << endl;
	
	return 0;
	
}

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

int main()
{
 int a,b,c,d,e,x,y;
 cin>>a>>b>>c>>d>>e;

 if(a<=b&&a<=c)x=a;
 if(b<=a&&b<=c)x=b;
 if(c<=a&&c<=b)x=c;

 if(d<e)y=d;
  else y=e;

 cout<<x+y-50;

  return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;

int n, a, b;

int main(){
	a = 10000, b = 10000;
	REP(i, 3){
		cin >> n;
		a = min(a, n);
	}
	REP(i, 2){
		cin >> n;
		b = min(b, n);
	}
	cout << a + b - 50 << endl;
}

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

using namespace std;

int main(){
  int mn1,mn2, sum;
  int a[3];
  int b[3];
  for(int i=0;i<3;i++){
    cin >> a[i];
  }

  for(int i=0;i<2;i++){
    cin >> b[i];
  }
  mn1 =2000;

  mn2=2000;
  
  for(int i=0;i<3;i++){
    if(a[i] < mn1) mn1 = a[i];
  }

  for(int i=0;i<2;i++){
    if(b[i] < mn2) mn2 = b[i];
  }


  sum = mn1 + mn2 -50;

  cout << sum << endl;
  return 0;
}

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

int main () {
	int a,b,c,d,e;
	int Ms1,Ms2,total;	
	cin >> a >> b >> c >> d >> e;
	if(a>c&&b>c){
		Ms1=c;
	}else{if(a>b&&c>b){
		Ms1=b;
	}else{if(b>a&&c>a){
		Ms1=a;
		}
	}
}
	if(d>e){
		Ms2=e;
	}else{
		Ms2=d;
	}

	total=(Ms1+Ms2)-50;
	cout << total << '\n';

	return 0;
}