2016-08-06 USACO USACO 1.1 - Your Ride Is Here The easiest problem in USACO training. #include <iostream>#include <fstream>#include <string>using namespace std;int main() { ofstream fout("ride.out"); ifstream fin("ride.in"); string comet, group; getline(fin, comet); getline(fin, group); long long valComet = 1; long long valGroup = 1; for (char &c : comet) valComet *= (c - 'A' + 1); valComet %= 47; for (char &c : group) valGroup *= (c - 'A' + 1); valGroup %= 47; if (valComet == valGroup) fout << "GO" << endl; else fout << "STAY" << endl; return 0;} Newer USACO 1.1 Greedy Gift Givers Older A C++ implementation of DijKstra Algorithm