Home > Back-end >  [Atcoder_Abc167] T2 - card
[Atcoder_Abc167] T2 - card

Time:11-17

Solving, c + +


Title description
TT is AA with digital 11 card, and BB with digital 00 card, and CC with Numbers? 1? 1 card, now lets you take just KK zhang, and put away the card Numbers together and ask what is the largest number you can get,

Input format
A line of four integers separated by A space. A, B, C, KA, B, C, K,

The output format
A line of an integer, say your answer,

Sample data
Input

1 1 2 3
The output

2
Input

1 2 3 4
The output

0
Input

2000000000 0 0, 2000000000
The output

2000000000
The data size and agreed
0 or less A, B, C0 acuities were A, B, C
1 K or less A + B + C or less 2 x 1091 K or less or less A + B + C or less or less 2 x 109
Time limit: 2 s2s
Space limit: 1024 MB
  • Related