; and (2) in accordance with this section. (b) Allotments From the amount appropriated to carry out this section for a fiscal year, the Secretary shall allot to each eligible State an amount that bears the same relationship to such appropriated amount as the amount that the State received for means-tested housing programs for the most recent fiscal year for which satisfactory data is available bears to the total amount appropriated for means-tested housing programs for that fiscal year. (c) Application To be eligible to receive a grant under this section, a State shall submit an application to the Secretary that includes the amount the State received for the previous year’s means-tested housing programs. (d) Use of funds A State that receives a grant under this section may only use the amounts of the grant— (1) to fund housing programs in the State; (2) to administer the programs described in paragraph (1); and (3) to provide direct technical assistance, oversight, monitoring, research, and training with respect to the programs described in paragraph (1). (e) Matching funds A State that receives a grant under this section shall provide, toward the cost of the programs assisted under the grant, from non-Federal sources, an amount equal to 20 percent of the amount of the grant. (f) Flexibility Notwithstanding any other provision of Federal law (other than this section), a State that receives a grant under this section— (1) shall have full flexibility to use the amounts of the grant to finance a housing provider, service, or program