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<cstdio>
#include<algorithm>
using namespace std;
int main(){
    int p;
    int ans = 10000;
    for(int i = 0;i < 3; i++){
        scanf("%d",&p);
        ans = min(ans,p);
    }
    int j1,j2;
    scanf("%d%d",&j1,&j2);
    (j1 > j2) ? ans += j2 : ans+=j1;

    printf("%d\n",ans-50);

    return 0;
}

C++: #include <stdio.h>

int main(){
int a,b,A=9999,B=9999;
for(int i=0;i<3;i++)scanf("%d",&a),A=min(A,a);
for(int i=0;i<2;i++)scanf("%d",&b),B=min(B,b);
printf("%d\n",A+B-50);
}

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

int main(){
   int p1,p2,p3,j1,j2,set;
   cin>>p1>>p2>>p3>>j1>>j2;
   if(p1<p2&&p1<p3){
     if(j1<j2){
       set = p1+j1-50;
       cout<<set<<endl;
     }else{
       set = p1+j2-50;
       cout<<set<<endl;
     }
   }else if(p2<p1&&p2<p3){
     if(j1<j2){
       set = p2+j1-50;
       cout<<set<<endl;
     }else{
       set = p2+j2-50;
       cout<<set<<endl;
     }
   }else if(p3<p1&&p3<p2){
     if(j1<j2){
       set = p3+j1-50;
       cout<<set<<endl;
     }else{
       set = p3+j2-50;
       cout<<set<<endl;
     }

   }
   return 0;
}

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

constexpr int INF = 1 << 30;

void solve() {
    int min, sum = 0;

    min = INF;
    for (int i = 0; i < 3; ++i) {
        int x;
        std::cin >> x;
        min = std::min(min, x);
    }
    sum += min;

    min = INF;
    for (int i = 0; i < 2; ++i) {
        int x;
        std::cin >> x;
        min = std::min(min, x);
    }
    sum += min;

    std::cout << sum - 50 << std::endl;
}

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

    solve();

    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
int a,b,c,d,e;
int MAX_p,MAX_q;

cin>>a>>b>>c>>d>>e;

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

if(d>=e)
{
MAX_q=d;
}
else
{
MAX_q=e;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int pasta[3];
	int juice[2];
	int i, j;
	int pmin = 2000;
	int	jmin = 2000;
	
	for (i = 0; i < 3; i++){
		cin >> pasta[i];
		if (pmin > pasta[i]){
			pmin = pasta[i];
		}
	}
	for (j = 0; j < 2; j++){
		cin >> juice[j];
		if (jmin > juice[j]){
			jmin = juice[j];
		}
	}
	
	cout << jmin + pmin - 50 << endl;
	
	return (0);
}

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

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

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

C++: #include<cstdio>

int main(){
  int c[2][3];
  for(int i=0;i<2;i++){
    for(int j=0;j<3;j++){
      if(i==1&&j==2) c[i][j] = 5000;
      else scanf("%d",&c[i][j]);
    }
  }
  int ans = 0;
  int x = 5000;
  for(int i=0;i<3;i++) if(c[0][i]<x) x = c[0][i];
  ans += x;
  x = 5000;
  for(int i=0;i<3;i++) if(c[1][i]<x) x = c[1][i];
  ans += x;
  printf("%d\n",ans-50);
  return 0;
}

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

using std::cin;
using std::cout;
using std::endl;
using std::array;
using std::for_each;
using std::min_element;

int main() {
	array<int,3> p;
	array<int,2> j;
	for_each(p.begin(),p.end(),[](int &x){cin >> x;});
	for_each(j.begin(),j.end(),[](int &x){cin >> x;});
	cout << *min_element(p.begin(),p.end()) + *min_element(j.begin(),j.end()) - 50 << endl;
}

C++: #include <iostream>
using namespace std;
const int inf = 1e9;

int main(){
    int p=inf, j=inf;
    for(int i=0; i<3; i++){
        int a;
        cin >> a;
        p = min(p, a);
    }
    for(int i=0; i<2; i++){
        int a;
        cin >> a;
        j = min(j, a);
    }
    cout << p+j-50 << endl;
    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 ){
    if( d < e ){
      cout<<a + d - 50<<endl;
    }
  }
  if( a < b && b <= c ){
    if( d > e ){
      cout<<a + e - 50<<endl;
    }
  }
  
  
  
  if( b < a && a <= c ){
    if( d < e ){
      cout<<b + d - 50<<endl;
    }
  }
  
  if( b < a && a <= c ){
   if( d > e ){
    cout<<b + e - 50<<endl;
  }
 }


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

 
  return 0;
}

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

int main(){
	int mini = 114514;
	int P[3];
	int J[2];
	
	for (int i = 0; i < 3; i++) cin >> P[i];
	for (int i = 0; i < 2; i++) cin >> J[i];
	
	for (int i = 0; i < 3; i++){
		for (int j = 0; j < 2; j++) mini = min(mini, P[i] + J[j]);
	}
	cout << mini - 50 << endl;
	return 0;
}

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

int main() {

	//ifstream cin("INPUT.txt");
	//ofstream cout("OUTPUT.txt");

	int i, p, j, x;
	p = 2000;
	for(i = 0; i < 3; i++){
		cin >> x;
		p = min(x, p);
	}
	j = 2000;
	for(i = 0; i < 2; i++) {
		cin >> x;
		j = min(x, j);
	}
	cout << p << endl << j << endl;
	cout << p + j - 50 << endl;

	return 0;

}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>

using namespace std;

int main(){
	int p1;
	int p2;
	int p3;
	int j1;
	int j2;
	cin >> p1 >> p2 >> p3 >> j1 >> j2;
	cout << min({ p1, min (p2, p3)  }) + min({ j1, j2 }) - 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;
  cout<<(min({a,b,c})+min(d,e)-50)<<endl;
  return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int p[3],j[2];
  cin >> p[0] >> p[1] >> p[2] >> j[0] >> j[1];
  sort(p,p+3);
  sort(j,j+2);
  cout << p[0]+j[0]-50 << endl;
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int p,j,P,J;
  cin>>P;
  for(int i=0;i<2;i++){
    cin>>p;
    if(p<P)P=p;
  }
  cin>>J;
  cin>>j;
  if(j<J)J=j;
  cout<<J+P-50<<endl;
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int pa,ju,most=10000,ans;
  for(int i=0;i<3;i++){
    cin >> pa;
    if(pa<ans){
      most=pa;
    }
  }
  ans=most;
  most=10000;
  for(int i=0;i<2;i++){
    cin >> ju;
    if(ju<most){
      most=ju;
    }
  }
  ans+=most-50;
  cout << ans << endl;
  return (0);
}

C++: #include <stdio.h>
int main(void){
    int a,b,c,d,e,f,g;
    scanf("%d", &a);
    scanf("%d", &b);
    scanf("%d", &c);
    scanf("%d", &d);
    scanf("%d", &e);
    if((a<=b)&&(a<=c))
        f=a;
    else if(b<=c)
        f=b;
    else
        f=c;
    if(d<=e)
        g=d;
    else
        g=e;
    int h=f+g-50;
    printf("%d\n", h);
}