Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <list>
  4. #include <iterator>
  5. #define _CRT_SECURE_NO_WARNINGS
  6. using namespace std;
  7. bool Comp(list <int> a,list <int>b){
  8. list <int>::iterator ita=a.begin();
  9. list <int>::iterator itb=a.begin();
  10. while(*ita!=*itb)
  11. ita++;
  12. while(*ita==*itb&&(ita!=a.end()||itb!=b.end())){
  13. ita++;
  14. itb++;
  15. if(ita==a.end()&&itb==b.end())
  16. return 1;
  17. }
  18. return false;
  19.  
  20. }
  21.  
  22. int main(){
  23. #ifdef _DEBUG
  24. freopen("input.txt","r",stdin);
  25. freopen("output.txt","w",stdout);
  26. #endif
  27. list <int> A,B;
  28. int n,m,tmp;
  29. for(int i=0;i<n;i++)
  30. cin>>tmp,A.push_front(tmp);
  31. for(int i=0;i<m;i++)
  32. cin>>tmp,B.push_front(tmp);
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement