#include <cmath> class Ants { public: double antsCollision(int n) { // write code here return 1- 1.0f/pow(2, n-1); } };