I assume you are in non-freezing conditions - or else this pipe is likely to freeze up at the outlet (and along the run also if not deep enough and end-protected from freezing) due to the low and intermittent water flow. Sump pump outlets VERY easily freeze up in weather, as the small amount of water commonly just glaciers in outdoor drain pipes. For that application, a rock-filled drain trench is commonly better - or using the perforated leach field pipe with the holes down in coarse gravel bedding so the water drains into the ground as soon as it is able, once away from the house. Related responses to simialr question here -
It is VERY, VERY difficult (without electric heating) to keep this kind of drain line unfrozen in areas with winters - both because the sump pump water freezes as it hits the frozen pipe/ground from air blowing through the pipe, and because of spring runoff from melting snow and early rains hitting the winter-frozen pipe and ground. It is not uncommon on commercial properties where this sort of thing is done to avoid open surface drainage (like under large parking lots) to have to heat the sump pump water or put thaw wires (wasting a lot of power) into or directly under the pipes. Generally, the plastic pipe cannot take that so they end up going with steel pipe. All in all, I MUCH prefer a surface swale leading away from the house (first 10 feet or so lined if in pervious soil so it can't make its way back to the foundation) to buried pipes for this sort of drainage.
Also, regardless of whether in an area with freezing or not, because of the potential for blockage from leaves, animal building a nest or burrow, crushing from construction equipment running over it, weeds growing up around the entrance and damming up the leaves, etc - I HIGHLY recommend a compacted earth or liner-underlaid sloping dirt area around where the drain pipe/downspout enters the underground drain, AND at least a several inch airgap at the entry so it the underground drain gets blocked, the sump pump and downspouts do not back up - they just spill onto the compacted apron and drain away from the foundation.
Note in many area dumping storm drainage like this into road drainages, and especially to curbed streets with storm drains, is illegal - so check local regs first.
As for the pipe, if you have to have curved runs then the flex pipe is probably best, though because of the leaf blockage issues avoid the type with interior corrugations - require the smooth inside lining. For straight runs, I routinely use and have no problems with the much cheaper 4" black HDPE lined, white outside PVC leach field and septic pipe - glued joints in areas where roots can get into it, and of course the unperforated version. It is also somewhat easier to find downspout and pipe adapters for dumping into it. Not that the corrugated is horrible - just if it has inside corrugations that is immediate hangup points for debris to start catching and hanging up, so more chance of blockage. Of course, you should flush this pipe out every year or few (based on how much debris comes out the first time you do it after the first year of use), Fall after most of the leaves are down but before freezeup is best time to do it, and right after roof/gutters are cleaned is best time, to flush out the debris from the roof.
At entry point - be SURE the sump pump dumps into the pipe at a higher elevation than the downspouts, to minimize any risk of backup into the sump pump from downspout backup. Using an angled tee entry point would be even better - downspout straight down to help flush leaves, sump pump dumping into a stub riser on the wye side.
For basically straight runs with only minor beds (use several 15 degree rather than sharper bends if possible to ease future cleaning with a hose with jet nozzle on it), you can also use the more expensive but stronger Schedule 80 PVC pipe - Schedule 40 is pretty thin unless carefully buried several feet down in sand bedding.
Regardless of type of pipe, be sure to provide cleanouts - typically the entry point (another reaon for the airgap, so you can get into the drain pipe with hose or drain cleaner without have to disassemble downspout or sump pump piping), at least every 50 feet or so along the run unloess within 50 feet of outlet or inlet, and the outlet too.
For all types of pipe, some copper sulfate (read instructions, generally about 2 serving spoons per joint) mixed into backfill and placed 360 degrees around each joint can significantly reduce the chance of root instrusion - especially with non-glued clamp-type joints. If perhaps using threaded pipe (rare in this size) then mixing copper sulfate with pipe dope at the thread assembly works well. There are also copper sulfate "bandages" you can just wrap around the joints - stick to themselves so go on and stay on nicely during backfilling - used by arborists to prevent slug/snail damage to plants (they wrap aroudn the bottom of the truck), also available as some plumbing supply places and commercial pipe dealers (used for same reason, to prevent root intrusion) on large diameter concrete and ductile iron pipe.
Of course, make sure the pipe is installed the right direction - at each joint, upstream piece should fit INSIDE the downstream piece, so there is no lip to catch debris. Coupled pipe like PVC the joints are designed to minimize this issue - the pipe itself is same diameter both ends unlike the irrigation and drain pipes.
Note that only Sch 40 and heavier steel pipe is suitable for shallow burial under drives or places that will be driven on by vehicles - either as an outer liner for other pipe, or as the drain pipe itself if using steel. The others need variable amounts of burial but genreally 1-2 feet to not be crushed, or broken if brittle with cold.
One thing to check - in many areas basement (as opposed to outside french drain wetwell) sump pumps are allowed to dump into the sanitary sewer inside the house, which for areas with freezing conditions in the winter is much more secure - has to go through a proper trap of course, and needs a substantial standpipe same as a washing machine to avoid overflow.