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 <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;

	return 0;
}

C++: #include<iostream>
#include<string>
#include <algorithm>
#include<iomanip>
#include<vector>
#include<cmath>

using std::cin; using std::string;
using std::cout; using std::endl;
#define rep(X,Y) for(int (X)=0;(X)<(Y);++(X))
#define rept(X,Y,Z) for(int (X)=(Y);(X)<(Z);++(X))
#define repr(X,Y) for(int (X)=(Y);(X)>=0;--(X))
const double pi=3.141592653589793283462;

int main(){
	int p[3],j[2];
	rep(i,3){
		cin>>p[i];
		}
    rep(i,2){
		cin>>j[i];
		}
	std::sort(p,p+3);
	std::sort(j,j+2);
	cout<<p[0]+j[0]-50<<endl;
}

C++: #include <cstdio>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    vector<int> a(3), b(2);
    cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1];

    sort(a.begin(), a.end());
    sort(b.begin(), b.end());

    int ret = a[0] + b[0] - 50;
    cout << ret << endl;

    return 0;
}

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++: //============================================================================
// Name        : lunch.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

int main() {
	int pasta[3], drink[2];
	for (int i = 0; i < 3; i++) {
		cin >> pasta[i];
	}
	for (int i = 0; i < 2; i++) {
		cin >> drink[i];
	}
	int sum = pasta[0] + drink[0] - 50;
	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 2; j++) {
			if(pasta[i] + drink[j] - 50 < sum){
				sum = pasta[i] + drink[j] - 50 ;
			}
		}
	}
	cout << sum << endl;
	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
	int d;
	int e;
	int f;
	int g;
	int h;
	cin >> d;
	cin >> e;
	cin >> f;
	cin >> g;
	cin >> h;
	
	if (d>=e&&e<=f&&g<=h)
	{
		cout << e + g - 50 << endl;
	}
	else if (d>=e&&e<f&&h<=g)
	{
		cout << e + h - 50 << endl;
	}
	if (e>=d&&d<=f&&g<=h)
	{
		cout << d + g - 50 << endl;
	}
	if (e>=d&&d<=f&&h<=g)
	{
		cout << d + h - 50 << endl;
	}
	if (e>=f&&f<=d&&g<=h)
	{
		cout << f + g -50<< endl;
	}
	if (e>=f&&f<=d&&h<= g)
	{
		cout << f + h -50<< endl;
	}
	


	
	return 0;
}

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

C++: #include <bits/stdc++.h>
using namespace std;

int main(){
  int a, b, c, d, e, min;
  cin>>a>>b>>c>>d>>e;
  int x1 = a + d - 50;
  int x2 = a + e - 50;
  int x3 = b + d - 50;
  int x4 = b + e - 50;
  int x5 = c + d - 50;
  int x6 = c + e - 50;
  if(x1 < x2 && x1 < x3 && x1 < x4 && x1 < x5 && x1 < x6) cout<<x1<<endl;
  if(x2 < x1 && x2 < x3 && x2 < x4 && x2 < x5 && x2 < x6) cout<<x2<<endl;
  if(x3 < x1 && x3 < x2 && x3 < x4 && x3 < x5 && x3 < x6) cout<<x3<<endl;
  if(x4 < x1 && x4 < x2 && x4 < x3 && x4 < x5 && x4 < x6) cout<<x4<<endl;
  if(x5 < x1 && x5 < x2 && x5 < x3 && x5 < x4 && x5 < x6) cout<<x5<<endl;
  if(x6 < x1 && x6 < x2 && x6 < x3 && x6 < x4 && x6 < x5) cout<<x6<<endl;
							    

  return 0;
}

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

int main(){
int buffer;
int pasta_min,juice_min;
std::vector<int> pasta;
std::vector<int> juice;

for(int i=0;i<3;i++){
  std::cout >> buffer;
  pasta.push_back(buffer);
}
for(i=0;i<2;i++){
  std::cout >> buffer;
  juice.push_back(buffer);
}
pasta_min = *std::min_element(pasta.begin(), pasta.end());
juice_min = *std::min_element(juice.begin(), juice.end());
std::cout << pasta_min+juice_min-50 << std::endl;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(void) {
  int p[3], j[2];

  while(cin >> p[0] >> p[1] >> p[2] >> j[0] >> j[1]) {
    sort(p, p+3);
    sort(j, j+2);
    int ans = p[0] + j[0];
    cout << ans - 50 << endl;
  }
  return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>

int main(){
	int a[3],b[2],Ans=0,amin=0,bmin=0;
	
	scanf("%d",&a[0]);
	amin=a[0];
	scanf("%d",&a[1]);
	if(amin>a[1])amin=a[1];
	scanf("%d",&a[2]);
	if(amin>a[2])amin=a[2];
	scanf("%d",&b[0]);
	scanf("%d",&b[1]);
	if(b[0]>b[1])bmin=b[1];else bmin=b[0];
	Ans=amin+bmin-50;
	printf("%d\n",Ans);
	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, min(p2, p3) });
	int j = min({ j1, j2 });
	cout << p + j - 50<< endl;

	return 0;
}

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

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

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

using namespace std;

int main(){

int a,b,c,d,e,pasta,juice;

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

pasta =a;

if(a>=b){
pasta=b;

if(b>=c){
pasta=c;}

}

juice=d;

if(d>=e)juice=e;

int sum=pasta+juice-50;

cout<<sum<<endl;

return 0;
}

C++: #include <bits/stdc++.h>
typedef long long LL;
using namespace std;

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

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end()
using namespace std;
typedef pair<int, int> pii;
#define MAX 99999999
int main(){
    vl v(5,0);rep(i,5)cin>>v[i];
    sort(v.begin(),v.begin()+3);
    cout<<v[0]+min(v[3],v[4])-50<<endl;
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(n);i++)
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
const ll INF=1e18;
const ll MOD=1e9+7;
const double pi=acos(-1);
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

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,b,c})+min(d,e)-50 << endl;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int a,b,c,d,e;
	cin>>a>>b>>c>>d>>e;
	if(a>b)swap(a,b);
	if(b>c)swap(b,c);
	if(a>b)swap(a,b);
	if(d>e)swap(d,e);
	cout<<a+d-50<<endl;
	return 0;
	}