fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4.  
  5. int main() {
  6. std::vector<std::string> words;
  7. std::string word;
  8. while (std::cin >> word)
  9. words.push_back(word);
  10. std::cout<<words[1];
  11. return 0;
  12. }
Success #stdin #stdout 0s 16064KB
stdin
word0 word1 word3
stdout
word1