Advertisement
Guest User

Untitled

a guest
May 29th, 2015
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. char a[10000],b[10000];
  6. while(scanf("%s %s",a,b)==2)
  7. {
  8. int c=0;
  9. for(int i=0,j=0;i<strlen(a),j<strlen(b);j++)
  10. {
  11. if(a[i]==b[j])
  12. {
  13. c+=1;
  14. i++;
  15. }
  16. }
  17.  
  18.  
  19. if(c==strlen(a))
  20. cout<<"Yes"<<endl;
  21. else
  22. cout<<"No"<<endl;
  23.  
  24. }
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. return 0;
  34. }
  35. #include <bits/stdc++.h>
  36. using namespace std;
  37. int main()
  38. {
  39. char a[10000],b[10000];
  40. while(scanf("%s %s",a,b)==2)
  41. {
  42. int c=0;
  43. for(int i=0,j=0;i<strlen(a),j<strlen(b);j++)
  44. {
  45. if(a[i]==b[j])
  46. {
  47. c+=1;
  48. i++;
  49. }
  50. }
  51.  
  52.  
  53. if(c==strlen(a))
  54. cout<<"Yes"<<endl;
  55. else
  56. cout<<"No"<<endl;
  57.  
  58. }
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. return 0;
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement