Zaslat SMS: Cycles in edge-coloured graphs and subgraphs of random graphs