A rectangular animal pen will use 100 meters of fencing to enclose three sides, while an existing barn forms the fourth side. If x meters is the length of each fence segment perpendicular to the barn and y meters is the length parallel to the barn so that 2x+y=100, which dimensions maximize the area of the pen?
a) x=25 m,y=25 m
b) x=50 m,y=25 m
c) x=25 m,y=50 m
d) x=3100 m,y=3100 m