Submission

Status:

[P-][P-][-][P][-][-][-][P][-][-]

Subtask/Task Score:

{0/10}{0/10}{0/10}{10/10}{0/10}{0/10}{0/10}{10/10}{0/10}{0/10}

Score: 20

User: SonnyHappy108

Problemset: โรงงานหุ่นยนต์

Language: cpp

Time: 0.004 second

Submitted On: 2026-04-11 13:45:31

#include <bits/stdc++.h>
using namespace std;
//done : 9
int main(){
	int hb,hw,bb,bw,sc,dc;
	cin >> hb >> hw >> bb >> bw >> sc >> dc;
	int head=hb+hw;
	int body=bb+bw;
	int sc1=min({sc,head,body});
	int a=sc1+min({dc,head-sc1,body-sc1});
	int dc1=min({dc,head,body});
	int b=dc1+min({sc,head-dc1,body-dc1});
	cout << max(a,b);
}