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

using namespace std;

int main(){

    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];
    int res=1000000000;
    for(int i=0;i<3;i++){
        for(int j=0;j<2;j++){
            res=max(0,min(res,a[i]+b[j]-50));
        }
    }
    cout<<res<<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++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e16;
const ll mod = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

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;
}
int ctoi(char c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  }
  return 0;
}
ll factorial(ll n) {
  if (n == 1) {
    return 1;
  }
  ll ans = factorial(n-1);
  return ans*n;
}
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a%b);
}
ll lcm(ll a, ll b) {
  return (a/gcd(a, b))*b;
}
bool is_prime(ll n) {
  for (ll i = 2; i*i <= n; i++) {
    if (n%i == 0) return false;
  }
  return n != 1;
}
ll mod_pow(ll x, ll n, ll mod) {
  if (n == 0) return 1;
  ll res = mod_pow(x*x%mod, n/2, mod);
  if (n & 1) res = res * x % mod;
  return res;
}

int main() {
    ll res1 = INF, res2 = INF;
    ll a;
    rep(i, 3) {
        cin >> a;
        res1 = min(res1, a);
    }
    rep(i, 2) {
        cin >> a;
        res2 = min(res2, a);
    }
    cout << res1 + res2 - 50 << endl;
}

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

int main(){
   int p1,p2,p3,j1,j2,set;
   cin>>p1>>p2>>p3>>j1>>j2;
   if(p1<p2&&p1<p3){
     if(j1<j2){
       set = p1+j1-50;
       cout<<set<<endl;
     }else{
       set = p1+j2-50;
       cout<<set<<endl;
     }
   }else if(p2<p1&&p2<p3){
     if(j1<j2){
       set = p2+j1-50;
       cout<<set<<endl;
     }else{
       set = p2+j2-50;
       cout<<set<<endl;
     }
   }else if(p3<p1&&p3<p2){
     if(j1<j2){
       set = p3+j1-50;
       cout<<set<<endl;
     }else{
       set = p3+j2-50;
       cout<<set<<endl;
     }
   }else if(p1==p2||p1==p3){
     if(j1<j2){
       set = p1+j1-50;
       cout<<set<<endl;
     }else{
       set = p1+j2-50;
       cout<<set<<endl;
     }
   }else if(p1==p2||p2==p3){
     if(j1<j2){
       set = p2+j1-50;
       cout<<set<<endl;
     }else{
       set = p2+j2-50;
       cout<<set<<endl;
     }
   }
   return 0;
}

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

int main(){
	int pa,pb,pc,ja,jb,ans=0;
	
	cin >> pa >> pb >> pc >> ja >> jb;
	
	if(pa < pb){
		ans += (pa < pc) ? pa : pc;
	}else{
		ans += (pb < pc) ? pb : pc;
	}
	
	ans += (ja < jb) ? ja : jb;
	
	cout << ans-50 << endl;
	
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,d,e,i,l,x;
	scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);
	i=a;
	if(b<i){
		i=b;
	}
	if(c<i){
		i=c;
	}
	l=d;
	if(e<l){
		l=e;
	}
	x=i+l-50;
	printf("%d\n",x);
	return 0;
}

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

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

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(void)
{
	int a,b,c,d,e;
	scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);
	if(c>=min(a,b)){
	printf("%d\n",min(a,b)+min(d,e)-50);
	}else{printf("%d\n",c+min(d,e)-50);}
	return 0;
}

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

int main(){
  int a, b, c, d, e;
  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;
  int x[6] = {x1, x2, x3, x4, x5, x6};
  int min = x[0];
  for(int i=0;i<6;i++){
    if(min > x[i]) min = x[i];
  }
  cout<<min<<endl;
	
  return 0;
}

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

C++: #include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
  int a[3],b,c;
  cin>>a[0]>>a[1]>>a[2];
  sort(a,a+3);
  cin>>b>>c;
  c=min(b,c);
  cout<<a[0]+c-50<<endl;
}

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

int main(){
	int p=2000,j=2000,n;
	for(int i=0;i<3;i++){
		scanf("%d",&n);
		if(n<p)p=n;
	}
	for(int i=0;i<2;i++){
		scanf("%d",&n);
		if(n<j)j=n;
	}
	printf("%d\n",p+j-50);
}

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

int main() {
	int pas[3];
	int jui[2];
	for (int i = 0; i < 3; i++) {
		cin >> pas[i];
	}
	for (int i = 0; i < 2; i++) {
		cin >> jui[i];
	}
	sort(pas, pas + 3);
	sort(jui, jui + 2);

	int a = pas[0] + jui[0] - 50;
	cout << a << endl;
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <climits>
#include <queue>
#include <set>
#include <map>
#include <valarray>
#include <bitset>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
typedef long long ll;
typedef pair<int,int> pii;
const int INF = 1<<29;
const double PI = acos(-1);
const double EPS = 1e-8;

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int a[5],sum;
	for(int i=0;i<5;i++){
		cin >> a[i];
	}
	if(a[0]<=a[1] && a[0]<=a[2]){
		sum=a[0];
	}else if(a[1]<=a[0] && a[1]<=a[2]){
		sum=a[1];
	}else if(a[2]<=a[0] && a[2]<=a[1]){
		sum=a[2];
	}
	if(a[3]<a[4]){
		sum=sum+a[3];
	}else{
		sum=sum+a[4];
	}
	cout << sum-50 << endl;
}

C++: #include<stdio.h>
int main(void)
{
	int a,i,X=0,x;
	x=2000;
	for(i=0;i<3;i++){
		scanf("%d",&a);
		if(x>a){
			x=a;
		}
	}
	X+=x;
	x=2000;
	for(i=0;i<2;i++){
		scanf("%d",&a);
		if(x>a){
			x=a;
		}
	}
	X+=x;
	printf("%d\n",X-50);
	return 0;
}

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

using namespace std;

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

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

    sort(a, a + 3);
    sort(b, b + 2);
    cout << a[0] + b[0] - 50 << endl;
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
  int minpas=3000,minju=3000,pas,ju;
  for(int i=0;i< 3;i++){
    cin >> pas;
    minpas = (minpas > pas)?pas:minpas;
  }for(int i=0;i<2;i++){
    cin >> ju;
    minju = (minju > ju)?ju:minju;
  }int synthetic=0;
  synthetic = minju+minpas -50;
  cout << synthetic << endl;
}

C++: #include<stdio.h>
int main(void)
{
	int i,x;
	int a[3];
	int b[2];
	for(i=0;i<3;i++)	{
	scanf("%d",&a[i]);
	}
	for(i=0;i<2;i++)	{
	scanf("%d",&b[i]);
	}
	x=a[0];
	
	for(i=0;i<3;i++)	{
	if(x>a[i])	{
	x=a[i];
	}
	//printf("%d\n",x);
	}
	if(b[0]>b[1])	{
	x=(x+b[1])-50;
	}
	else	{
	x=(x+b[0])-50;
	}
	printf("%d\n",x);
	return 0;
}