fork(9) download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <cassert>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8. srand(1234567890);
  9. vector<string> teams = {
  10. "France", "Switzerland", "Romania", "Albania",
  11. "Wales", "England", "Russia", "Slovakia",
  12. "Germany", "Poland", "Northern Ireland", "Ukraine",
  13. "Spain", "Croatia", "Czech Republic", "Turkey",
  14. "Belgium", "Italy", "Ireland", "Sweden",
  15. "Portugal", "Iceland", "Austria", "Hungary"
  16. };
  17. sort(teams.begin(), teams.end());
  18. assert(teams.size() == 24);
  19. int winner = rand() % teams.size();
  20. cout << "The winner of EURO 2016: " << teams[winner] << endl;
  21. return 0;
  22. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
The winner of EURO 2016: Portugal