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<cstdio>
#include<string>
#include<algorithm>

using namespace std;

int main(){
	int pa[3],ju[2],temp=4001;
	
	for(int i=0;i<3;i++) scanf("%d",&pa[i]);
	for(int i=0;i<2;i++) scanf("%d",&ju[i]);
	for(int i=0;i<3;i++){
		for(int j=0;j<2;j++){
			if(temp>pa[i]+ju[j]-50)
			temp=pa[i]+ju[j]-50;
		}
	}
	printf("%d\n",temp);
}

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

int main()
{
  int a[3];
  int b, c;

  cin >> a[0] >> a[1] >> a[2] >> b >> c;

  sort(a, a + 3);

  if (c < b){
    b = c;
  }
  cout << a[0] + b - 50 << endl;

  return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
//a:パスタ,b:ジュース
int a,b,a1,a2,a3,b1,b2;

cin >> a1 >> a2 >> a3 >> b1 >> b2;

if(a1<100||2000<a1){
      cout << "エラー" << endl;
      return 0;
}
if(a2<100||2000<a2){
      cout << "エラー" << endl;
      return 0;
}
if(a3<100||2000<a3){
      cout << "エラー" << endl;
      return 0;
}
if(b1<100||2000<b1){
      cout << "エラー" << endl;
      return 0;
}
if(b2<100||2000<b2){
      cout << "エラー" << endl;
      return 0;
}

if((a1>=a2)&&(a2>=a3)){
   a = a3;
}
if((a2>=a1)&&(a1>=a3)){
   a = a3;
}
if((a1>=a3)&&(a3>=a2)){
   a = a2;
}
if((a3>=a1)&&(a1>=a2)){
   a = a2;
}
if((a3>=a2)&&(a2>=a1)){
   a = a1;
}
if((a2>=a3)&&(a3>=a1)){
   a = a1;
}
if(b1<b2){
   b = b1;
}
else{
   b = b2;
}

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

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

C++: #include<iostream>
using namespace std;
int main(void){
	int a[100000], b, c, g = 0, h = 0, i, j, g1[10000]={0}, g2[10000]={0};
	for(i=0;i<3;i++){	
		cin >> a[i];
	}
	cin >> b >> c;
	for(i=0;i<3;i++){	
		g1[i] = a[i] + b - 50;
		g2[i] = a[i] + c - 50;
	}
	if(g1[0] < g1[1]) g = g1[0];	
	else g = g1[1];
	if(g > g1[2]) g = g1[2];
	if(g2[0] < g2[1]) h = g2[0];	
	else h = g2[1];
	if(h > g2[2]) h = g2[2];
	if(g < h) cout << g;
	else cout << h;
 	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<cstring>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()

const int MAX = 2010;

int main()
{
    int p = MAX, j = MAX, t;
    REP(3){ cin >> t; p = min(p, t);}
    REP(2){ cin >> t; j = min(j, t);}
    cout << p + j - 50 << endl;

    return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
 
int main() {
	int pasta = 2001, juice = 2001;
 
	for(int i = 0; 3 > i; i++){
		 int buf;
		 scanf("%d", &buf);
		 if(buf < pasta) pasta = buf;
	}
	for(int i = 0; 2 > i; i++){
		 int buf;
		 scanf("%d", &buf);
		 if(buf < juice) juice = buf;
	}
 
	printf("%d\n", juice+pasta-50);
	return 0;
}

C++: #include <stdio.h>
#include <stack>
#include <math.h>

using namespace std;



int main(){

	int a,b,c,d,e;

	scanf("%d\n%d\n%d\n%d\n%d",&a,&b,&c,&d,&e);

	printf("%d\n",min(a,min(b,c))+min(c,d)-50);

    return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
    int t,p=2000,j=2000;
    for(int i=0;i<3;++i){
        cin>>t;p=p<t?p:t;
    }
    for(int i=0;i<2;++i){
        cin>>t;j=j<t?j:t;
    }
    cout<<p+j-50<<endl;
    return 0;
}

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

using namespace std;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int a[3],b[2];
	int pas,dri,i; 
	
	for(i=0; i<3; i++) cin >> a[i];
	for(i=0; i<2; i++) cin >> b[i];

	sort(a,a + 3);
	sort(b,b + 2);

	printf("%d\n", a[0] + b[0] - 50);

	return 0;
}

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

int main() {
    int ps[5];
    while (cin >> ps[0] >> ps[1] >> ps[2] >> ps[3] >> ps[4]) {
        int p_min = min(ps[0], min(ps[1], ps[2])) + min(ps[3], ps[4]) - 50;
        cout << p_min << endl;
    }
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <ctime>
#include <vector>
#include <stack>

using namespace std;
////////////////*My library*////////////////////////
#define rep_to(a,i,n) for(int i=a;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rep_r(i,n) for(int i=n-1;i>=0;i--)
#define debug(x) cout<<x<<endl
#define s_1(x) cin>>x
#define s_2(x,y) cin>>x>>y
////////////////////////////////////////////////////

////////////////////////
/*prime()*/
/*primecount()*/
/*sort()*/
/*imos???*/
/*????????¢?´¢*/
/*??±???????????¢?´¢*/
/*???????¨???????*/
///////////////////////
int main()
{
	int N[5];
	int mi1=2000,mi2=2000;
	rep(i,5)
	{
		s_1(N[i]);
		if(i<=2)mi1=min(N[i],mi1);
		else if(i>=3 && i<=4)mi2=min(N[i],mi2);
	}
	cout<<mi1+mi2-50<<endl;
	return 0;
}

C++: 
#include<iostream>

using namespace std;

int main(){
	
	
	cin >> a >> b >> c >> d >>e;
	    if (99<a<1000)
        if (99<b<1000)
		if (99<c<1000)
		if (99<d<1000)	
        if (99<e<1000)

					
	if (a<b<c)
	{ 
		cout <<a+min(d,e)-50<<endl;
	}
	else if (a<c<b)
	{
		cout <<a+min(d,e)-50<<endl;
	}
	else if (b<a<c )
	{
		cout <<b+min(d,e)-50<<endl;
	}
	else if (b<c<a )
	{
		cout <<b+min(d,e)-50<<endl;
	}
	else if (c<a<b )
	{
		cout <<c+min(d,e)-50<<endl;
	}
	
	else  if(c<b<a)
	{
		cout <<c+min(d,e)-50<<endl;
	}
		
	else if (a=b<c)
	{
		cout <<a+min(d,e)-50<<endl;

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

	}	
	else if (a=c<b)
	{
		cout <<a+min(d,e)-50<<endl;

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

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

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

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

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"
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 <iostream>
#include <stdio.h>
#include <map>
#include <algorithm>
#include <string>

int main(void)
{
    int t;
    int pasta=10000, juice=10000;

    std::cin >> t;
    pasta = std::min(t,pasta);
    std::cin >> t;
    pasta = std::min(t,pasta);
    std::cin >> t;
    pasta = std::min(t,pasta);

    std::cin >> t;
    juice = std::min(t,juice);
    std::cin >> t;
    juice = std::min(t,juice);

    std::cout << (pasta+juice-50) << std::endl;

    return 0;
}

C++: #include "bits/stdc++.h"

using namespace std;

const char en = '\n';
using  ll =          long long;
using ull = unsigned long long;
#define REP(i  ,n) for(int i=0;i<n;i++)
#define FOR(i,s,g) for(int i=s;i<g;i++)
const ll INFL = 810810191911451400;
const int INF =       1919114514;

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

	int pasta=INF,juice=INF,buf;
	REP(i, 3){
		cin>>buf;
		pasta=min(pasta,buf);
	}
	REP(i, 2){
		cin>>buf;
		juice=min(juice,buf);
	}

	cout<<pasta+juice-50<<en;
	return 0;
}