fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <string>
  4. using namespace std;
  5.  
  6.  
  7. int main() {
  8.  
  9. vector<string> a1;
  10. a1.push_back("AA");
  11. a1.push_back("BB");
  12. vector<string> a2;
  13. a2.push_back("CC");
  14. vector<string> a3;
  15. a3.push_back("DD");
  16. a3.push_back("EE");
  17. a3.push_back("FF");
  18. vector<string> a4;
  19. a4.push_back("GG");
  20.  
  21. for (unsigned int i1 = 0; i1 < a1.size(); ++i1)
  22. for (unsigned int i2 = 0; i2 < a2.size(); ++i2)
  23. for (unsigned int i3 = 0; i3 < a3.size(); ++i3)
  24. for (unsigned int i4 = 0; i4 < a4.size(); ++i4)
  25. cout << a1[i1] << " " << a2[i2] << " " << a3[i3] << " " << a4[i4] << std::endl;
  26.  
  27.  
  28.  
  29.  
  30. return 0;
  31. }
Success #stdin #stdout 0s 3032KB
stdin
Standard input is empty
stdout
AA CC DD GG
AA CC EE GG
AA CC FF GG
BB CC DD GG
BB CC EE GG
BB CC FF GG