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>
#include <string>
#include <vector>
#include <map>
#include <sstream>
#include <functional>
#include <numeric>
#include <cmath>
#include <cstring>
#include <queue>

using namespace std;
int n;

const int INF = 1 << 29;

int main(void)
{
	int pasta = INF;
	for (int i = 0; i < 3; i++)
	{
		int tmp;
		cin >> tmp;
		pasta = min(tmp, pasta);
	}
	int juice = INF;
	for (int i = 0; i < 2; i++)
	{
		int tmp;
		cin >> tmp;
		juice = min(tmp, juice);
	}
	cout << pasta + juice - 50 << endl;
	return 0;
}

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

int main(){
 
 int a,b,c,x,y,p;
 cin>>a>>b>>c>>x>>y;
  
 if((a>=b)&&(b>=c))
  p=c-50;
 if((a>=c)&&(c>=b))
  p=b-50;
 if((b>=c)&&(c>=a))
  p=a-50;
 if((b>=a)&&(a>=c))
  p=c-50;
 if((c>=a)&&(a>=b))
  p=b-50;
 if((c>=b)&&(b>=a))
  p=a-50;
 
 if(x>=y)
  cout<<p+y<<'\n';
 else
  cout<<p+x<<'\n';

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;
	
	return 0;
	
}

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

int main(){
    int a[3];
    int b[2];
    int m=10000;
    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++){
            m=min(m,a[i]+b[j]-50);
        }
    }
    cout<<m<<endl;
    return 0;
}

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

#define INF 1.1e9
#define LINF 1.1e18
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) for (int i = (n) - 1; i >= 0; i--)
#define ALL(v) (v).begin(), (v).end()
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define BIT(x, n) bitset<n>(x)
#define PI 3.14159265358979323846

typedef long long ll;
typedef pair< int, int > P;
typedef pair< int, P > PP;

//------------------------------------------------

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<algorithm>
using namespace std;
int main(void)
{
	int a[5],b[5],i,j;
	for(i=0;i<3;i++) cin>>a[i];
	for(j=0;j<2;j++) cin>>b[j];
	sort(a,a+3); sort(b,b+2);
	cout<<(a[0]+b[0])-50<<endl;
	return 0;
}

C++: #define	_USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <string>
using namespace std;
int main(){
	
	int a[3],b[2];
	
	for(int i=0;i<3;i++)
		cin>>a[i];
	
	for(int j=0;j<2;j++)
		cin>>b[j];
	
	sort(a,a+3);
	sort(b,b+2);
	
	cout<<a[0]+b[0]-50<<endl;

}

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

#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
typedef vector<int>vint;
typedef pair<int,int>pint;

int get(int n){
    int ret=114514;
    rep(i,n){
        int a;cin>>a;
        ret=min(ret,a);
    }
    return ret;
}


int main(){
    int x=get(3);
    int y=get(2);
    cout<<x+y-50<<endl;
    return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
	int pa, pb, pc, ja, jb,p=0,j=0;
	cin >> pa >> pb >> pc >> ja >> jb;
	{if (pa < pb)
	{
		if (pa < pc)
		{
			p=pa;
		}
		else
		{
			p = pc;
		}
	}

	else
	{
		if (pb < pc)
		{
			p = pb;
		}
		else
		{
			p = pc;
		}
	}
	}
	{
		if (ja > jb)
		{
			j = jb;
		}
		else
		{
			j = ja;
		}
	}
	cout << p+j-50 << 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>
#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;
	}

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

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;
	}
	else if(e<=d){
		n=e-25;
	}
	ans=m+n;
	printf("%d\n",ans);
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <algorithm>
#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
using namespace std;
int main(void){
    int p[3],ju[2];
    rep(i,0,3)cin>>p[i];
    rep(i,0,2)cin>>ju[i];
    
    int ans=100000000;
    rep(i,0,3)rep(j,0,2)ans=min(ans,p[i]+ju[j]);
    cout<<ans-50<<endl;
    
    
    return 0;
}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int min(int a,int b){return a<b?a:b;}
int main(){
	int a[3],b[2];
	int i,j;
	for(i=0;i<3;i++)scanf("%d",&a[i]);
	for(i=0;i<2;i++)scanf("%d",&b[i]);
	sort(a,a+3);
	sort(b,b+2);
	printf("%d\n",a[0]+b[0]-50);
	return 0;
}

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

int main() {
	int a,b,c,d,e,f,g,h;
	cin >> a >> b >> c >> d >> e >> f >> g >> h;
	int S=a+b+c+d;
	int T=e+f+g+h;
	if (S>T){
		cout << S << endl;
	}
	else cout << T << endl;
	
	
	// your code goes here
	return 0;
}

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

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

  minn = (p1 + j1) - 50;
  minn = min(minn, (p1+j2) - 50);
  minn = min(minn, (p1+j2) - 50);
  minn = min(minn, (p2+j1) - 50);
  minn = min(minn, (p2+j2) - 50);
  minn = min(minn, (p3+j1) - 50);
  minn = min(minn, (p3+j2) - 50);

  cout << minn << 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;
    return 0;
}

C++: #include <stdio.h>
#define INF (1<<28)

int main() {
  int i, v, a, b;
  a = b = INF;
  for(i = 0; i < 3; ++i) {
    scanf("%d", &v);
    if(v < a) a = v;
  }
  for(i = 0; i < 2; ++i) {
    scanf("%d", &v);
    if(v < b) b = v;
  }
  printf("%d\n", a+b-50);
  return 0;
}

C++: #include <iostream>
#include <algorithm>
int main(void){
    int n[5],p,j;
    for(int i=0;i<5;++i){
        std::cin>>n[i];
    }
    p=std::min(n[0],n[1]);
    p=std::min(p,n[2]);
    j=std::min(n[3],n[4]);
    std::cout<<p+j-50<<std::endl;
    return 0;
}

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