fork download
  1. #include <algorithm>
  2. #include <cassert>
  3. #include <iostream>
  4. #include <vector>
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9. srand(1234567890);
  10. vector<string> teams = {
  11. "Bayern", "Arsenal", "PSG", "Barcelona",
  12. "Real Madrid", "Napoli", "Manchester City", "Monaco",
  13. "Benfica", "Borussia Dortmund", "Porto", "Juventus",
  14. "Bayer", "Atletico", "Sevilla", "Leicester City"
  15. };
  16. sort(teams.begin(), teams.end());
  17. assert(teams.size() == 16);
  18. int winner = rand() % teams.size();
  19. cout << "The winner of UEFA Champions League 2016/17: " << teams[winner] << endl;
  20. return 0;
  21. }
Success #stdin #stdout 0s 15248KB
stdin
Standard input is empty
stdout
The winner of UEFA Champions League 2016/17: Real Madrid