Rules for swimming is determined before that will compete with what and how much distance. Which participants will need to swim, as defined. The first person who entered will win.
Swimming rules will determine that. What position and distance to compete with it. The contestants will have to swim as scheduled. Be the first one to the finish line to win.
Swimming rules set before that. To compete with what stroke and distance. The contestants will be swimming as written. Who gets to the finish line first will win.