Untitled

mail@pastecode.io avatar
unknown
c_cpp
10 days ago
819 B
5
Indexable
Never
#include <bits/stdc++.h>
using namespace std;
#define ll long long
 
vector<int>v;
vector<int>v1;
ll Min = INT_MAX;
ll Max = INT_MIN;
 
void hekal(string a)
{
	int c = 0;
	int j = a.size()-1;
	for (int i = 0; i < a.size()/2; i++)
	{
		if (a[i] != a[j])
		{
			cout << "NO";
			c++;
			break;
		}
		j--;
	}
	if (!c)
	{
		cout << "YES";
	}
 
}
 
 
int main()
{
	int* A,* B, x,n,m;
	cin >> n >> m;
	A = new int[n*m];
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < m; j++)
		{
			cin >> *(A + i * m + j);
		}
	}
	int c = 0;
	cin >> x;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < m; j++) {
 
			if (x ==  * (A + i * m + j))
			{
				cout << "will not take number";
				c++;
				break;
			}
		}
	
	}
	if (!c)
	{
		cout << "will take number";
	}
}
Leave a Comment