Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- long long size,sizesqu;
- cin>>size>>sizesqu;
- long long arr[size],arrsqu[sizesqu];
- for(int i=0;i<size;i++){
- cin>>arr[i];
- }
- for(int i=0;i<sizesqu;i++){
- cin>>arrsqu[i];
- }
- int z=0;
- int couter=0;
- for(int i=0;i<size;i++){
- if(arr[i]==arrsqu[z]){
- couter++;
- z++;
- }
- }
- if(couter==sizesqu){
- cout<<"YES";
- }else{
- cout<<"NO";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement