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 <bits/stdc++.h>
using namespace std;

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

  if( a < b && b < c){
    if( d < e ){
      cout<< a + d - 50<<endl;
    }
  }
  if( a < c && c < b){
    if( d < e ){
      cout<< a + d - 50<<endl;
    }
  }
  
  if( a < b && b < c){
    if( d > e ){
      cout<< a + e - 50<<endl;
    }
  }
  if( a < c && c < b){
    if( d > e ){
      cout<< a + e - 50<<endl;
    }
  }

  
  
  if( b < a && a < c){
    if( d < e ){
      cout<< b + d - 50<<endl;
    }
  }
  if( b < c && c < a){
    if( d < e ){
      cout<< b + d - 50<<endl;
    }
  }
if( b < a && a < c){
  if( d > e ){
    cout<< b + e - 50<<endl;
  }
 }
if( b < c && c < a){
  if( d > e ){
    cout<< b + e - 50<<endl;
  }
 }


 
 if( c < b && b < a){
   if( d < e ){
     cout<< c + d - 50<<endl;
   }
 }
 if( c < a && a < b){
   if( d < e ){
     cout<< c + d - 50<<endl;
   }
 }
 if( c < b && b < a){
   if( d > e ){
     cout<< c + e - 50<<endl;
   }
 }
if( c < a && a < b){
   if( d > e ){
     cout<< c + e - 50<<endl;
   }
 }
 
  return 0;
}

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

int main(){
    int minP, minD, tmp;
    cin >>tmp;
    minP = tmp;
    for(int i = 0; i < 2; i++){
        cin >>tmp;
        if(minP > tmp) minP = tmp;
    }
    cin >>tmp;
    minD = tmp;
    cin >>tmp;
    if(minD > tmp) minD = tmp;
    cout <<minP + minD - 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<stdio.h>
#include<iostream>
#include<string>
#include<math.h>

using namespace std;

int min(int* rep) {
	int length = sizeof(rep) / sizeof(int);

	int min = rep[0];

	for (int i = 1; i < length; i++) {
		if (min > rep[i]) {
			min = rep[i];
		}
	}
	return min;

}


int main(){

	int pasta[3];
	int juice[2];

	cin >> pasta[0] >> pasta[1] >> pasta[2] >> juice[0] >> juice[1];

	int minPasta = min(pasta);
	int minJuice = min(juice);

	cout << minPasta + minJuice - 50 << endl;



	//system("pause");
    return 0;
}

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
	int min=2000,min2=2000,pasta,drink;
	for(int cnt=0;cnt<5;cnt++){
		if(cnt<3){
			cin << pasta;
			if(min>pasta){
				min=pasta;
			}
		}
		else{
			cin << drink;
			if(min2>drink){
				min2=drink;
			}
		}
	}
	printf("%d\n",min+min2-50);
}

C++: #include<iostream>
using namespace std;
int main()
{
int a,b,c,d,e;
int MAX_p,MAX_q;

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

if(a<=b&&a<=c)
{
MAX_p=a;
}
else if(b<=a&&b<=c)
{
MAX_p=b;
}
else
{
MAX_p=c;
}

if(d<=e)
{
MAX_q=d;
}
else
{
MAX_q=e;
}

cout<<MAX_p+MAX_q-50;
}

C++: #include<stdio.h>

int main()
{
	int c,c2,p,j,sum1=0,sum2=0;

	for(c=0;c<=2;c++){
		scanf("%d",&p);
		if(sum1<p){
			sum1=p;
		}
	}
	for(c2=0;c2<=1;c2++){
		scanf("%d",&j);
		if(sum2<j){
			sum2=j;
				}
	}

	printf("%d",(sum1+sum2)-50);

	return 0;
}

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

int main()
{
     int a;int b;int c;int d;int e;int x;int y;
     cin >> a;
     if(a<100||a>2000){
     cout << "error" << endl;
     return 0;
      }
      cin >> b;
     if(b<100||b>2000){
     cout << "error" << endl;
     return 0;
      }
      cin >> c;
     if(c<100||c>2000){
     cout << "error" << endl;
     return 0;
      }
      cin >> d;
     if(d<100||d>2000){
     cout << "error" << endl;
     return 0;
      }
      cin >> e;
     if(e<100||e>2000){
     cout << "error" << endl;
     return 0;
      }
     if(a<b&&b<c)
        x=a;
     else if(b<a&&b<c)
        x=b;
     else
        x=c;
     if(d<e)
        y=d;
     else
        y=e;
     cout << x+y-50 << '\n';
return 0;
}

C++: import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		int a=0,b=0,c;
		for(int i = 0;i < 3;i++){
			c=in.nextInt();
			if(i == 0) a = c;
			else{
				if(a > c){
					a = c;
				}
			}
		}
		for(int i = 0;i < 2;i++){
			c=in.nextInt();
			if(i == 0) b = c;
			else{
				if(b > c){
					b = c;
				}
			}
		}
		c = a + b - 50;
		System.out.println(c);
	}
}

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

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

int main(){
  int p[3],j[2],ans=0;
  for(int i=0;i<3;i++){
    cin >> p[i];
  }
  for(int i=0;i<2;i++){
    cin >> j[i];
  }
  ans += min(p[0],min(p[1],p[2]));
  ans += min(j[0],j[1]);
  ans -= 50;
  cout << ans << endl;
}

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

using namespace std;

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,min,sum;
  cin >> min >> a >> b;
  min=a;
  if(min > a){
    min=a;
  }
  if(min > b){
    min=b;
  }
  sum=min;
  cin >> min >> a;
  if(min > a){
    min=a;
  }
  cout << sum+min-50 << endl;
  return 0;
}

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

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

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

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(void) {
  int p[3];
  int 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;
}