fork(1) download
  1. /**
  2.  * author: brownfox2k6
  3.  * created: Wed 16 Apr 2025 23:51:38 Hanoi, Vietnam
  4. **/
  5. #include <bits/stdc++.h>
  6. using namespace std;
  7.  
  8. signed main() {
  9. vector<int> choices = {7, 9999999, 5, 3};
  10. int seed = accumulate(choices.begin(), choices.end(), 0);
  11. srand(seed);
  12. vector<string> names = {"Trọng Đại", "Xuân Thi", "Đình Cảnh", "Tiến Dũng",
  13. "Minh Trúc", "Tùng Lâm", "Minh Tuấn", "Minh Khuê"};
  14. while (true) {
  15. int trong_tai = rand() % 8;
  16. int giam_sat = rand() % 8;
  17. if (trong_tai == giam_sat) {
  18. continue;
  19. }
  20. cout << "Trọng tài: " << names[trong_tai] << '\n';
  21. cout << "Giám sát: " << names[giam_sat] << '\n';
  22. return 0;
  23. }
  24. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
Trọng tài: Minh Tuấn
Giám sát: Trọng Đại