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<stdio.h>
int main(void)
{
	int p[3];
	int j[2];
	int min;
	int s;
	int i;
	
	s=0;
	min=10000;
	for(i=0;i<3;i++){
		scanf("%d",&p[i]);
		if(min>p[i]){
			min=p[i];
		}
	}
	for(i=0;i<2;i++){
		scanf("%d",&j[i]);
	}
	if(j[0]<j[1]){
		s=min+j[0];
	}
	else {
		s=min+j[1];
	}
	printf("%d\n",s-50);
	return 0;
}

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


int main ()
{
	int a=0,b=0,c=0,d=0,e=0;
	
	cin>>a>>b>>c>>d>>e;
	
	int A=9999,B=9999;
	
	if(a<A)A=a;
	if(b<A)A=b;
	if(c<A)A=c;
	if(d<B)B=d;
	if(e<B)B=e;
	
	cout<<A+B-50<<endl;
	
	
	
	
	
	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 <bits/stdc++.h>
using namespace std;

int main()
{
	int a = 2000, b = 2000;
	for (int i = 0; i < 3; i++) {
		int tmp;
		cin >> tmp;
		a = min(a, tmp);
	}
	for (int i = 0; i < 2; i++) {
		int tmp;
		cin >> tmp;
		b = min(b, tmp);
	}
	cout << a + b - 50 << endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int pa,ju,most=100000,ans;
  for(int i=0;i<3;i++){
    cin >> pa;
    if(pa<=ans){
      most=pa;
    }
  }
  ans=most;
  most=1000000;
  for(int i=0;i<2;i++){
    cin >> ju;
    if(ju<=most){
      most=ju;
    }
  }
  ans+=most;
  ans-=50;
  cout << ans << 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 <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main() {
	vector<int> a(3), b(2);
	for (int& i : a) cin >> i;
	for (int& i : b) cin >> i;
	cout << *min_element(a.begin(), a.end()) + *min_element(b.begin(), b.end()) - 50 << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int P[3], J[2];
    int minp = 2000, minj = 2000;

    for(int i = 0; i < 3; i++){
        cin >> P[i];
        if(P[i] < minp) minp = P[i];
    }

    for(int i = 0; i < 2; i++){
        cin >> J[i];
        if(J[i] < minj) minj = J[i];
    }
    cout << (minp + minj - 50) << endl;
}

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

using namespace std;

int main(void)
{
	int pa[3],ju[2];
	int x,y,i;
	for(i=0;i<3;i++){
		scanf("%d",&pa[i]);
	}
	for(i=0;i<2;i++){
		scanf("%d",&ju[i]);
	}
	sort(pa,pa+3);
	sort(ju,ju+2);
	x=pa[0]+ju[0]-50;
	printf("%d\n",x);
	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>
#include<algorithm>
using namespace std;

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

C++: #include<bits/stdc++.h>
using namespace std;
const int INF = (1<<30);

int main() {
  
  int min_p = INF, min_j = INF;

  for(int i=0; i<3; i++) {
    int a; cin >> a;
    if( min_p > a ) min_p = a;
  }

  for(int i=0; i<2; i++) {
    int a; cin >> a;
    if( min_j > a ) min_j = a;
  }

  cout << min_p + min_j - 50 << endl;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <stack>
#include <string>
#include <cmath>
#include <cstdio>
using namespace std;

#define PI 4*atan(1);

int main(){
  int p[3], j[2];
  int sum[6];
  for(int i = 0; i < 3; i++){
    cin >> p[i];
  }
  for(int i = 0; i < 2; i++){
    cin >> j[i];
  }
  sum[0] = p[0] + j[0] - 50;
  sum[1] = p[1] + j[0] - 50;
  sum[2] = p[2] + j[0] - 50;
  sum[3] = p[0] + j[1] - 50;
  sum[4] = p[1] + j[1] - 50;
  sum[5] = p[2] + j[1] - 50;
  sort(sum, sum + 6);
  cout << sum[0] << endl;
}

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

using namespace std;

int main(){
	int pasta[3], juice[2];

	for (int i = 0; i < 3; i++){
		cin >> pasta[i];
	}

	for (int j = 0; j < 2; j++){
		cin >> juice[j];
	}

	sort(pasta, pasta + 3);
	sort(juice, juice + 2);

	pasta[0] = pasta[0] + juice[0] - 50;

	cout << pasta[0] << endl;
}

C++: #include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
#define INF (3000)
int main(){
  int m1=INF,m2=INF;
  for(int i=0;i<3;i++){
    int a;
    scanf("%d",&a);
    m1 = min(a,m1);
  }
  for(int i=0;i<2;i++){
    int a;
    scanf("%d",&a);
    m2 = min(a,m2);
  }
  printf("%d\n",m1+m2-50);
}

C++: #include<iostream>
using namespace std;
int main(void){
	int a[10000], 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 <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < (n); i++)
using namespace std;

int main(){
	int a[5];
	REP(i,5)cin >> a[i];
	cout << min(min(a[0],a[1]),a[2]) + min(a[3],a[4]) -50 << endl;
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int p[3],j[2],minp=2000,minj=2000;
	for(int i=0;i<3;++i){
		cin>>p[i];
		if(minp>p[i])minp=p[i];
	}
	for(int i=0;i<2;++i){
		cin>>j[i];
		if(minj>j[i])minj=j[i];
	}
	cout<<minp+minj-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<=){
		m=a-25;
	}
	else if(b<=a&&b<=c){
		m=b-25;
	}
	else{
		m=c-25;
	}
	if(d<=e){
		n=d-25;
	}
	else{
		n=e-25;
	}
	ans=m+n;
	printf("%d\n",ans);
	return 0;
}

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

using namespace std;

int main(void){
	int A, B, C, D, E;
	cin >> A >> B >> C >> D >> E;
	cout << min(D,E)+min(A,min(B,C))-50 << endl;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a,b,c,d,e;
	int A=0;
	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-50<<endl;
	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	int ans=-50;
	{
		int tmp=5000;
		for(int i=0;i<3;i++){
			int x;
			cin>>x;
			tmp=min(tmp,x);
		}
		ans+=tmp;
	}
	{
		int tmp=5000;
		for(int i=0;i<2;i++){
			int x;
			cin>>x;
			tmp=min(tmp,x);
		}
		ans+=tmp;
	}
	
	cout<<ans<<endl;
}

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

int main(){
  int i, j, x, min=10000;
  int p[3],d[2];

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

  for (i=0; i<3; i++){
    for (j=0; j<2; j++){
      x=p[i]+d[j]-50;
      if (x<min) min=x;
    }
  }

  cout << min << endl;

  return 0;
}