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 data;
  int minv;
  for(int i = 0;i < 3;i++) {
    minv = INT_MAX;
    cin >> data;
    minv = min(data,minv);
  }
  int a,b;
  cin >> a >> b;
  if(a < b)cout << minv + a - 50 << endl;
  else cout << minv + b - 50 << endl;
  return 0;
}

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

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

int a, b, c, d, e;

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

C++: #include<iostream>
using namespace std;
int main(){

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

C++: #include<cstdio>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int p,j,i,MIN,MIN1;
	MIN=3000;
	MIN1=3000;
	for(i=1;i<=3;i++){
		scanf("%d",&p);
		MIN=min(MIN,p);
	}
	for(i=1;i<=2;i++){
		scanf("%d",&j);
		MIN1=min(MIN1,j);
	}
	printf("%d\n",MIN1+MIN-50);
	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<stdio.h>
int main()
{
	int i,j,A,B,a,b;
	a=999999;
	B=999999;
	for(i=0;i<3;i++){
		scanf("%d",&A);
		if(a>A){
			a=A;
		}
	}
	for(i=0;i<2;i++){
		scanf("%d",&B);
			if(b>B){
			b=B;
		}
		A=A+B-50;
	}
	printf("%d\n",A);
	}

C++: //============================================================================
// Name        : JOI.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;
int A,B,C,D,E;
int main() {
	cin>>A>>B>>C>>D>>E;
	int S=0,T=0;
	if(A<B && A<C)S=A;
	if(B<C && B<A)S=B;
	if(C<A && C<B)S=C;
	if(A<C && B<C && A==B)S=A;
	if(B<A && C<A && B==C)S=B;
	if(C<B && A<B && C==A)S=C;

	if(D<E)T=D;
	if(E<D || D==E)T=E;
	cout<<S+T-50<<endl;

	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <string.h>
#include <functional>
#include <algorithm>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
#include <stdlib.h>

using namespace std;

int main (void)
{
	int a[2000],co,d,e;

	co = 3000;
	for (int i = 0; i < 3; i++)
	{
		cin >> a[i];

		if (a[i] < co)
		{
			co = 0;
			co = a[i];
		}
	}
	cin >> d >> e;

	if (d <= e)
	{
		cout << co + d - 50 << endl;
	}
	else if (d > e)
	{
		cout << co + e - 50 << endl;
	}
}

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

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

using namespace std;



int main(void)
{
	int p[3];
	int z[2];

	int max_p , max_z;

	cin >> p[0] >> p[1] >> p[2] >> z[0] >> z[1];

	max_p = min(p[0] , min(p[1] , p[2]));
	max_z = min(z[0] , z[1]);

	cout << max_p + max_z - 50 << endl;

	return 0;
}

C++: #include<iostream>
using namespace std;
int i, n, pA, pB, tA= 0, tB= 0;
int main(){
    while(cin >> n) {
        if(n == 0) {break; }
        for (i=1; i<=n; i++) {
            cin >> pA>>pB;
            if (pA >pB) {
                tA += pA +pB;
            } else {
                if (pA<pB) {
                    tB += pA +pB;
                } else {
                    tA += pA;
                    tB += pB;
                }
            }
         }
         cout << tA << " "<< tB << endl;
         tA = 0; tB = 0;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

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;

    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 <iostream>
#include<algorithm>
int main(){
	int p[3],j[2], pasta, juice;
	std::cin >> p[0] >> p[1] >> p[2] >> j[0] >> j[1];
	pasta = std::min(p[0], std::min(p[1], p[2]));
	juice = std::min(j[0],j[1]);
	std::cout << pasta + juice-50 << std::endl;
}

C++: #include <iostream>

int f(int a,int b,int c){
    if(a<=b&&a<=c){
        return a;
    }else if(b<c){
    return b;
    }
    else {
        return c;
    }
}
int i(int x,int y){
    if(x<=y){
    return x;
    }else {
        return y;
    }
}
int main(){
    int a,b,c,d,e;
    std::cin>>a>>b>>c>>d>>e;
    std::cout<<f(a,b,c)+i(d,e)-50<<std::endl;
    return 0;
}

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

int main(){
int a,b,c,d,e,f;
cin>>a>>b>>c>>d>>e;
if(a>b){
if(b>c)
f=c;
if(b<c)
f=b;
}
else{
if(a<c)
f=a;
if(a>c)
f=c;
}

if(d<e)
cout<<f+d-50;

if(d>e)
cout<<f+e-50;

return 0;
}

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

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

typedef long long ll;
typedef pair<int, int> P;
#define MOD 1000000007
#define INF (1 << 30)
#define REP(i, m, n) for(int i = (int)m; i < (int)n; ++i)
#define rep(i, n) REP(i, 0, n)


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

    vector<int> pasta(3);
    rep(i, 3) cin >> pasta[i];
    vector<int> juice(2);
    rep(i, 2) cin >> juice[i];
    int ans = INF;
    rep(i, 3) rep(j, 2) {
        ans = min(ans, pasta[i] + juice[j] - 50);
    }
    cout << ans << '\n';
    return 0;
}

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

using namespace std;

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

  return 0;
}