"Idea": simulation. Note that one is the time when the hare rested the turtle could have arrived. I didn't think about wa80% at the beginning.
"AC Code":
#include <iostream> #include <algorithm> #include <iomanip> #include <cstdio> #include < Cstring>using namespace Std;int Main () {//freopen ("In.txt", "R", stdin);//freopen ("OUT.txt", "w", stdout); int v1 = 0, V 2 = 0, t = 0, s = 0, L = 0;int len_t = 0, Len_r = 0, cnt = 0, i = 0;cin >> v1 >> v2 >> t >> s > > L;while (True) {Cnt++;len_r + = v1;len_t + = v2;if (Len_r = len_t && len_t = = L) {cout << "D" << End L << Cnt;return 0;} else if (len_t = = L) {cout << "T" << Endl << cnt;return 0;} else if (Len_r = = L) {cout << "R" << Endl << cnt;return 0;} if (len_r-len_t >= t) {//cnt + = s;//len_t + = v2*s;for (i = 1; I <= s; i++) {cnt++;len_t + = v2;if (Len_r = len_t &am p;& len_t = = L) {cout << "D" << Endl << cnt;return 0;} else if (len_t = = L) {cout << "T" << Endl << cnt;return 0;} else if (Len_r = = L) {cout << "R" << Endl << Cnt;return 0;}}}}}
Blue Bridge Cup BASIC 24 turtle and Rabbit Race Prediction (analogue)