To get those two in particular, you would need to be in one of the following categories, in 2011:
First, I have to explain what is Active Duty Order of Merit. That is not the same as National Order of Merit. There were about 5400 ROTC cadets in 2011 who qualified to be Commissioned. Of those, abut 1,700 were pre-committed, or CHOSE, Army Reserves, Army National Guard, or Army Nurse Corps. That leaves about 3,700 cadets who wanted to get Active Duty Regular Army assignment. However, in 2011, there was room in Active Duty Regular Army for only about 2,800 new 2LTs. So, of those 3,700 who wanted AD, about 900, or 15%, were too low on the National Order of Merit list to qualify for Active Duty. Those 900 were "referred" or "forced" into the Reserve Component. That left about 2,800 cadets who qualified for Active Duty Branching. It is the 2,800 cadets that compose the Active Duty Order of Merit List.
AVIATION
a. in the top 15% of the Active Duty Order of Merit List (ADOML)
b. between 15% and 20% of the ADOML and use ADSO (commit to 3 extra years of AD service)
c. between 50% of the ADOML and 87% of ADOML and use ADSO.
*note* between 20% and 50% of ADOML was out of the range in 2011, as was 87% - 100%
INFANTRY
a. in the top 18% of the Active Duty Order of Merit List (ADOML)
b. between 18% and 30% of the ADOML and use ADSO (commit to 3 extra years of AD service)
c. between 50% of the ADOML and 77% of ADOML and use ADSO.
*note* between 30% and 50% of ADOML was out of the range in 2011, as was 77% - 100%
The Army uses a procedure to guarantee that the 16 Branches get 2LTs from the top half of the ADOML, as well as from the bottom half. So you don't have to be a top ADOML performer to get assigned into the hardest-to-get Branches. I would normally make a comment about the wisdom of that particular process, but this isn't the place!