the ratio of training set, validation set and testing set in K-fold cross validation
For K-fold cross validation, you would not need a separate validation set. In your example of 100 samples, if you have train:test set ratio to be as 80:20 and follow the 5-fold CV algorithm, the train set (80 samples) will be split into five 16 sample subsets ($s_i$) as in $\{s_1, s_2, s_3, s_4, s_5\}$. At each iteration, the model will select any 4 subsets out of the 5 subsets, based on your selection criteria, and use the left-out set as the validation set.
Once the training is completed, you can test the performance of the final model with the held-out test set (20 samples) to get an unbiased estimate of the performance of the model.
It is not necessary to have same number of samples in validation set and test set.