-
Notifications
You must be signed in to change notification settings - Fork 0
/
S_Search_In_Matrix.cpp
65 lines (56 loc) · 1.16 KB
/
S_Search_In_Matrix.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// GOOD LUCK
// | | | Ķ
// ( | Ķ
// | | |Ķ
// ) | Ķ
// | | • | Ķ
// DATE: 09-12-2022
// TIME: 22-55-00
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define sq(a) (a) * (a)
#define f first
#define s second
#define pb push_back
#define mp make_pair
#define forn(i, n) for (int i = 0; i < n; i++)
// #define forn(i,n) for (const int &n : numbers)
#define REP(i, a, b) for (int i = a; i <= b; i++)
#define DEP(i, b, a) for (int i = b; i >= a; i--)
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(NULL);
int n, m;
cin >> n >> m;
int arr[n][m];
forn(i, n)
{
forn(j, m)
{
cin >>
arr[i][j];
}
}
int x, ct = 0;
cin >> x;
forn(i, n)
{
forn(j, m)
{
if (arr[i][j] == x)
{
ct++;
}
}
}
if (ct > 0)
cout << "will not take number"
<< "\n";
else
cout << "will take number"
<< "\n";
return 0;
}