arrow_forward
همه ارسالها
جزئیات ارسال کد#518
برای پسندیدن وارد شوید
1#include <iostream>
2#include <string>
3
4using namespace std;
5
6
7int main()
8{
9
10 int n,m;
11 cin >> n >> m;
12 int arr[n];
13 int arr1[m];
14 int count = 0;
15
16 for (int i = 0; i < n ; i++ )
17 {
18 cin >> arr[i];
19 }
20 for (int j = 0 ; j < m ; j++)
21 {
22 cin >> arr1[j];
23 }
24 for (int j = 0; j < m ; j++)
25 {
26 for (int i = 0; i < n ; i++)
27 {
28 if (arr1[j] == arr[i])
29 {
30 count++;
31 }
32 }
33 }
34 if (count == m)
35 {
36 cout << "Yes";
37 }
38 else
39 cout << "No";
40
41
42
43 return 0;
44 }
کد ارسالشده برای داوری خودکار هاتکدز
UTF-8