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>
using namespace std;

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

C++: #include <stdio.h>
#include <algorithm>
using namespace std;

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

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

int main()
{
int A,B,C,a,b,x,y;
cin>>A>>B>>C>>a>>b;

if(A>B){
         if(C>B)x=B;
         if(C<B)x=C;
}
else {
      if(C>A)x=A;
      if(C<A)x=C;
}

if(a>b) y=b;
else y=a;

cout<<x+y-50<<'\n';                               

return 0;
}

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

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::cin >> buffer;
  pasta.push_back(buffer);
}
for(int j=0;j<2;j++){
  std::cin >> 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 <stdio.h>

int main()
{
  int i,j;
  int pasta[3];
  int juse[2];
  int min1,min2;
  for(i=0;i<3;i++)
    {
      scanf("%d",&pasta[i]);
}

min1=pasta[0];

 for(i=1;i<3;i++)
    {
      
      if(min1>pasta[i])min1=pasta[i];
}

 for(i=0;i<2;i++)
    {
      scanf("%d",&juse[i]);
}

min2=juse[0];
 
for(i=1;i<3;i++)
    {      
      if(min2>juse[i])min2=juse[i];
} 

 printf("%d\n",min1+min2-50);

 return 0;

}

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, a < c && c < b ){
    if( d < e ){
      cout<<a + d - 50<<endl;
    }
  }
  if( a < b && b < c, a < c && c < b ){
    if( d > e ){
      cout<<a + e - 50<<endl;
    }
  }
  
  
  
  if( b < a && a < c, b < c && c < a ){
    if( d < e ){
      cout<<b + d - 50<<endl;
    }
  }
  
  if( b < a && a < c, b < c && c < a ){
   if( d > e ){
    cout<<b + e - 50<<endl;
  }
 }


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

 
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b,c;
	cin>>a>>b>>c;
	if(a>b){
		a=b;
	}if(a>c){
		a=c;
	}
	int d,e;
	cin>>d>>e;
	if(d>e){
		d=e;
	}
	printf("%d\n",d+a-50);
}

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

C++: #include <stdio.h>
int main(){
	int i,pasta,drink,input;
	pasta=0;
	drink=0;
	scanf("%d",&pasta);
	for(i=0;i<2;i++){
		scanf("%d",&input);
		if(pasta>input)pasta=input;
	}
	scanf("%d",&drink);
	scanf("%d",&input);
	if(drink>input)drink=input;
	printf("%d\n",pasta+drink-50);
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<<'\n';

  return 0;
}

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

using namespace std;

int main() {
	
	int pasta[3], juice[2];

	while (cin >> pasta[0]) {

		cin >> pasta[1] >> pasta[2] >> juice[0] >> juice[1];
		sort(pasta, pasta + 3);
		sort(juice, juice + 2);

		cout << pasta[0] + juice[0] - 50 << "\n";

	}

	return 0;

}

C++: #include<iostream>
using namespace std;
int main() {
	int p[3], d[2];
	int minp = 29999, mind = 29999;
	for (int i = 0; i < 3; i++) {
		cin >> p[i];
		if (p[i] < minp) minp = p[i];
	}
	for (int k = 0; k < 2; k++) {
		cin >> d[k];
		if (d[k] < mind) mind = d[k];
	}
	cout << mind + minp-50 << endl;
}

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

using namespace std;

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

  if( p1 >= p2 && p2 >= p3 ) P = p3; 
  else if( p1 >= p3 && p3 >= p2 ) P = p2; 
  else if( p2 >= p1 && p1 >= p3 ) P = p3; 
  else if( p2 >= p3 && p3 >= p1 ) P = p1;
  else if( p3 >= p1 && p1 >= p2 ) P = p2;
  else if( p3 >= p2 && p2 >= p1 ) P = p1;


  int J = min(j1,j2);

  cout << P + J - 50 << endl;

  return 0;
}

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

C++: #include<stdio.h>

int main(void)
{
	int ne[6];
	int ans[2];
	int i;
	
	for(i=0;i<5;i++){
		scanf("%d",&ne[i]);
	}
	if(ne[0]<ne[1] && ne[0]<ne[2])
	ans[0]=ne[0];
	
	if(ne[1]<ne[0] && ne[1]<ne[2])
	ans[0]=ne[1];
	
	else
	ans[0]=ne[2];
	
	if(ne[3]<ne[4])
	ans[1]=ne[3];
	
	else
	ans[1]=ne[4];
	
	printf("%d",ans[0]+ans[1]-50);
}

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

using namespace std;

int main()
{
	int a [3];
	int b [2];
	cin >> a[1] >> a[2] >> a[3] >> b[1] >> b[2];
	int c[6]= {a[1] + b[1], a[1] + b[2], a[2] + b[1], a[2] + b[2], a[3] + b[1], a[3] + b[2]};
	sort(c, c + 6);
	{for (int i = 0; i < 1; i++)
	    cout << c[i] - 50 << endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

#define MIN(a,b) ((a)<(b)?(a):(b))

int main()
{
    int pastamin=2001;
    int drinkmin=2001;
    int temp;
    for(int i=0; i<3; ++i) {
        cin >> temp;
        pastamin=MIN(pastamin,temp);
    }
    for(int i=0; i<2; ++i) {
        cin >> temp;
        drinkmin=MIN(drinkmin,temp);
    }
    cout << pastamin+drinkmin-50 << endl;
    return 0;
}

C++: #include <iostream>
using namespace std;
int min(int x,int y){
	if(x<y) return x;
	return y;
}
int main() {
	int p[3],j[2];
	int minp,minj;
	int daikin;
	for(int i=0;i<3;i++){
		cin >> p[i];
	}
	for(int i=0;i<2;i++){
		cin >> j[i];
	}
	minp=min(p[0],p[1]);
	minp=min(minp,p[2]);
	minj=min(j[0],j[1]);
	daikin=minp+minj-50;
	cout << daikin << endl;
	
	// your code goes here
	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pii;

int main(){
	int d[5],p,j;
	rep(i,0,5) cin>>d[i];
	p=min(d[0],min(d[1],d[2]));
	j=min(d[3],d[4]);
	o(p+j-50);
}

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

int main(void){
    int pasta[3], juice[2];
    for(int i=0; i < 3; i++)
        cin >> pasta[i];
    for(int i=0; i < 2; i++)
        cin >> juice[i];
    
    int min = 1000000;
    for(int i=0; i < 3; i++){
        for(int j=0; j < 2; j++){
            if(pasta[i] + juice[j] - 50 < min){
                min = pasta[i] + juice[j] - 50;
            }
        }
    }
    cout << min << 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;
	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;
	}