#include "FrogSquare.cpp" int main(int argc, char **argv) { int i; class FrogSquare TheClass; int retval; int n; int d; int sx; int sy; int tx; int ty; if (argc != 2) { fprintf(stderr, "usage: a.out num or -\n"); exit(1); } if ((string) argv[1] == "-") { cin >> n >> d >> sx >> sy >> tx >> ty; } else { if (atoi(argv[1]) == 0) { n = 100; d = 10; sx = 0; sy = 0; tx = 3; ty = 4; } if (atoi(argv[1]) == 1) { n = 100; d = 5; sx = 0; sy = 0; tx = 3; ty = 4; } if (atoi(argv[1]) == 2) { n = 100; d = 200; sx = 0; sy = 0; tx = 3; ty = 4; } if (atoi(argv[1]) == 3) { n = 10; d = 7; sx = 4; sy = 4; tx = 5; ty = 5; } if (atoi(argv[1]) == 4) { n = 1; d = 1; sx = 0; sy = 0; tx = 0; ty = 0; } if (atoi(argv[1]) == 5) { n = 689; d = 731; sx = 249; sy = 97; tx = 599; ty = 237; } } retval = TheClass.minimalJumps(n, d, sx, sy, tx, ty); cout << retval << endl; exit(0); }