fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5. string A;
  6. cin >> A;
  7. cin.ignore();
  8.  
  9. string line, k;
  10.  
  11. while (getline(cin, line)) {
  12. k += line;
  13. k += '\n';
  14. }
  15.  
  16. for (int i = 0; i + 8 < k.size(); i++) {
  17.  
  18. if (k[i] == 'x' &&
  19. k[i+1] == 'n' &&
  20. k[i+2] == 'h' &&
  21. k[i+3] == 'a' &&
  22. k[i+4] == 'u' &&
  23. k[i+5] == '.') {
  24.  
  25. k.replace(i + 6, 3, A);
  26. }
  27. }
  28.  
  29. cout << k;
  30. }
Success #stdin #stdout 0s 5320KB
stdin
bet
https://x...content-available-to-author-only...u.ing/video/420658/be-hoc-sinh-2008-lon-muot-dang-thu-dam-thi-bo-mo-cua-vao-2/
https://x...content-available-to-author-only...u.ing/video/420655/be-hoc-sinh-2008-lon-muot-dang-thu-dam-thi-bo-mo-cua-vao/
https://x...content-available-to-author-only...u.ing/video/420666/bon-chua-tinh-2009-nay-cua-rieng-anh-th/
https://x...content-available-to-author-only...u.ing/video/420611/em-hotgirl-moc-moc-mot-thoi-call-show-vu-lon-cuc-muot-p8/
https://x...content-available-to-author-only...u.ing/video/420607/em-hotgirl-moc-moc-mot-thoi-call-show-vu-lon-cuc-muot-p6/
https://x...content-available-to-author-only...u.ing/video/420612/em-hotgirl-moc-moc-mot-thoi-call-show-vu-lon-cuc-muot-p9/
https://x...content-available-to-author-only...u.ing/video/420609/em-hotgirl-moc-moc-mot-thoi-call-show-vu-lon-cuc-muot-p7/
https://x...content-available-to-author-only...u.ing/video/420603/em-hotgirl-moc-moc-mot-thoi-call-show-vu-lon-cuc-muot-p3/
stdout
https://x...content-available-to-author-only...u.bet/video/420658/be-hoc-sinh-2008-lon-muot-dang-thu-dam-thi-bo-mo-cua-vao-2/
https://x...content-available-to-author-only...u.bet/video/420655/be-hoc-sinh-2008-lon-muot-dang-thu-dam-thi-bo-mo-cua-vao/
https://x...content-available-to-author-only...u.bet/video/420666/bon-chua-tinh-2009-nay-cua-rieng-anh-th/
https://x...content-available-to-author-only...u.bet/video/420611/em-hotgirl-moc-moc-mot-thoi-call-show-vu-lon-cuc-muot-p8/
https://x...content-available-to-author-only...u.bet/video/420607/em-hotgirl-moc-moc-mot-thoi-call-show-vu-lon-cuc-muot-p6/
https://x...content-available-to-author-only...u.bet/video/420612/em-hotgirl-moc-moc-mot-thoi-call-show-vu-lon-cuc-muot-p9/
https://x...content-available-to-author-only...u.bet/video/420609/em-hotgirl-moc-moc-mot-thoi-call-show-vu-lon-cuc-muot-p7/
https://x...content-available-to-author-only...u.bet/video/420603/em-hotgirl-moc-moc-mot-thoi-call-show-vu-lon-cuc-muot-p3/