blob: 9274c5fad8953a39b16f06fb8f43325822684ff3 [file] [log] [blame]
Lei YU65207482019-10-11 16:39:36 +08001#include <cstdio>
2#include <string>
3#include <vector>
4
Lei YU65207482019-10-11 16:39:36 +08005int main(int argc, char** argv)
6{
7 if (argc < 2)
8 {
9 printf("Usage: %s versions...\n", argv[0]);
10 return 1;
11 }
12
13 std::vector<std::string> versions(argv + 1, argv + argc);
14 std::string latest;
15 for (const auto& s : versions)
16 {
17 if (latest < s)
18 {
19 latest = s;
20 }
21 }
22
23 printf("%s", latest.c_str());
24 return 0;
25}