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 p1, p2, p3, j1, j2; cin >> p1 >> p2 >> p3 >> j1 >> j2;
    const int p_min = min({p1, p2, p3});  // C++14
    const int j_min = min(j1, j2);
    cout << p_min + j_min - 50 << endl;
}

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

int main(){
  int minP = INT_MAX;
  for(int i = 0; i < 3; i++){
    int x;
    cin >> x;
    minP = min(minP, x);
  }

  int minJ = INT_MAX;
  for(int i = 0; i < 2; i++){
    int x;
    cin >> x;
    minJ = min(minJ, x);
  }

  cout << minP + minJ - 50 << endl;
}

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

using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int a = INT_MAX,b = INT_MAX, tmp;
	for (int i = 0;i < 3;i++){
		cin >> tmp;
		a = min(tmp,a);
	}	
	for (int i = 0;i < 2;i++){
		cin >> tmp;
		b = min(tmp,b);
	}

	cout << a+b-50 << endl;

	return 0;

}

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

int main(void){
	int p=10000;
	int ju=10000;
	
	for(int i = 0; i < 3; i++){
		int t;
		scanf("%d", &t);
		if(p>t)p = t;
	}
	
	for(int i = 0; i < 2; i++){
		int t;
		scanf("%d", &t);
		if(ju>t)ju = t;
	}
	
	printf("%d\n", ju+p-50);
	return 0;
}

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

int main(){
	int p1, p2, p3, j1, j2;
	cin >> p1 >> p2 >> p3 >> j1 >> j2;
	int ans = min( p1 , min(p2,p3) ) + min(j1,j2) - 50;
	cout << ans << endl;
}

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

int main(){
  int n;
  int p[3],d[2];

  for(int i=0;i<3;i++)cin >> p[i];
  for(int i=0;i<2;i++)cin >> d[i];

  int ans = 10000;
  for(int i=0;i<3;i++)
    for(int j=0;j<2;j++)ans = min(ans,p[i]+d[j]-50);

  cout << ans << endl;
}

C++: #include<bits/stdc++.h>
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>

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
using namespace std;
typedef long long  ll;
const int MAX = 10000;

/** Problem0565 : Lunch **/
int main()
{
	int minP=INF, minJ=INF;
	rep(i, 3) {
		int n;
		cin >> n;
		if (minP > n)
			minP = n;
	}
	rep(i, 2) {
		int n;
		cin >> n;
		if (minJ > n)
			minJ = n;
	}
	cout << minP + minJ - 50 << endl;
}

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

int main(){
  int t,m1 = 1 << 25,m2 = 1 << 25;
  for(int i=0;i<3;i++){
    cin >> t; m1 = min(m1,t);
  }
  for(int i=0;i<2;i++){
    cin >> t; m2 = min(m2,t);
  }
  cout << m1 + m2 - 50 << endl;
}

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<stdlib.h>
#include<cstdlib>
using namespace std;

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

C++: #include<iostream>
using namespace std;
int main(){
	int a[5],i,max=99999,maxl=99999;
	for(i=0;i<5;i++){
		cin>>a[i];
	}
	for(i=0;i<3;i++){
		if(max>a[i])max=a[i];
	}
	for(i=3;i<5;i++){
		if(maxl>a[i])maxl=a[i];
	}
	cout<<max+maxl-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;
	}

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

int main(){


  int a,b,c,d,e;
  int p,j,sum;
  
  cin >> a>>b>>c>>d>>e;

  sum=a;
  if(b>c){
    if(sum>c) sum=c;
  }else if(sum>b) sum=b;

  if(d>e){
    sum+=e;
  }else sum+=d;

  sum -= 50;
  cout << sum <<endl;

  
  
  return 0;
}

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

#define rep_(v, f, l) for (int v = (f), v##_ = (l); v < v##_; ++v)
#define rep(v, n) rep_(v, 0, n)
#define lep(v, n) rep_(v, 1, n + 1)
#define rrep_(v, f, l) for (int v = (l), v##_ = (f); v >= v##_; --v)
#define rrep(v, n) rrep_(v, 0, n - 1)
#define rlep(v, n) rrep_(v, 1, n)
#define show_a(a, size) rep(a##_it, size) std::cout << a[a##_it] << " \n"[a##_it == a##_it_ - 1];
#define show_v(v) show_a(v, v.size())
#define eachv(v, i) rep(i, v.size())
#define reachv(v, i) rrep(i, v.size())
#define debug(x) std::cerr << #x << " = " << x << "\n";

using namespace std;

typedef long long int lint;

static inline int in(){ int x; scanf("%d", &x); return x; }
static inline lint inl(){ lint x; scanf("%lld", &x); return x; }

int main()
{
    int pasta = min(in(), min(in(), in()));
    int juice = min(in(), in());
    printf("%d\n", pasta + juice - 50);
    return (0);
}

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

int main(){
	
	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];
	}
	
	sort(pasta, pasta+3);
	sort(juice, juice+2);
	
	cout << pasta[0] + juice[0] - 50 << endl;
	
	return 0;

}

C++: #include<iostream>

int main(){
	int pas[2],juice,min1,min2;
	std::cin>>min1>>pas[0]>>pas[1]>>min2>>juice;
	for(int i=0;i<2;i++)if(min1>pas[i])min1=pas[i];
	if(min2>juice)min2=juice;
	std::cout<<min1+min2-50<<std::endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	
	int a;
	int b;
	int c;
	cin >> a;
	cin >> b;
	cin >> c;

	int k = a;
	if (a > b) {
		k = b;
		if (b > c) {
			k = c;
		}
	}
	if (a > c) {
		k = c;
		if (b < c) {
			k = b;
		}
	}
    
	int p;
	int q;

	cin >> p;
	cin >> q;
	 
	int n = p;
	if (p > q) {
		n = q;
	}
	int sum = k + n -50;
	cout << sum << 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<bits/stdc++.h>
using namespace std;





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

C++: #include <iostream>
int main(){
	int a,b,c,x,y;
	std::cin>>a>>b>>c>>x>>y;
	if(a>b){
		a=b;
	}
	if(a>c){
		a=c;
	}
	if(y<=x){
		x=y;
	}
	std::cout<<a+x-50<<std::endl;
	return 0;
}

C++: #include <iostream>
 
using namespace std;
 
int minPrice(int* menu, int length) {
    int mPrice = 0;
    for (int i = 0; i < length; i++) {
        if (mPrice == 0 || mPrice > menu[i])
            mPrice = menu[i];
    }
 
    return mPrice;
}
 
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 minSetPrice = minPrice(pasta, 3) + minPrice(juice, 2) - 50;
    cout << minSetPrice << endl;
}

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;

if(c>=a)pasta=a;

}

}

juice=d;

if(d>=e)juice=e;

int sum=pasta+juice-50;

cout<<sum<<endl;

return 0;
}

C++: #include <cstdio>

int main (int argc, char const* argv[])
{
	int a=2000,b=2000,c,i;
	for(i=0;i<3;i++){
		scanf("%d",&c);
		if(a>c)a=c;
	}
	for(i=0;i<2;i++){
		scanf("%d",&c);
		if(b>c)b=c;
	}
	
	printf("%d\n",a+b-50);
	
	
	return 0;
}