As drawn your circuit won't work for a number of reasons. You cannot just take the uC inputs and place them in water.
First, note what cr0sh mentions:
However, it goes well beyond that. If you have an ohmeter fill a cup with water and place the probes in the cup spaced about an inch or 39mm apart. Here in Cleveland, Ohio US I get a resistance in excess of 100 K Ohms which is far from a short. Matter of fact at 5 volts the current would be about 50 uA. Your uC will be clueless that anything has changed.
To make this work with a uC you will need a circuit before the uC to condition your signal(s) from the water. I would suggest a variation of the attached drawing. However, a circuit variation designed to run on 5 Volts. Incidentally the chip in the circuit is a CD4011 quad nand gate. The relay and diode would be replaced with a 2.2 K resistor or maybe a 10 K resistor and the transistor can be any general purpose switching transistor like a 2N3904 or 2N222 type. The signal off the collector would go to your uC giving you nice 5 volt logic.
Unimportant but a matter of trivia, when we measure water we don't generally measure resistance but conductivity. Resistance as measured in units of Ohms and conductance measured in units of Mhos (Ohms spelled backwards)
. Mhos being the reciprocal of Ohms.
Ron
Ron