they are different because cannot means you're saying that you're not gonna able to go swimming (later), But could not means you're saying that you didn't get a chance to go swimming (earlier). Cannot is present tense. Could not is past tense.
Could not Cannot difference?
In statements, we use "can't" for present tense, and "couldn't" for past tense. Examples, "I can't help you right now." "He can't come to the phone." "We couldn't finish all the food." "She couldn't find the stapler." So, "can't" is used to refer to impossible things in the present.
Can not or Cannot correct usage?
Both cannot and can not are perfectly fine, but cannot is far more common and is therefore recommended, especially in any kind of formal writing. Can't has the same meaning, but as with contractions in general, it is somewhat informal.