Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace proiect
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n, m, i, j;
- n = int.Parse(Console.ReadLine());
- m = int.Parse(Console.ReadLine());
- int[] t = new int[n];
- int[] s = new int[m];
- for (i = 0; i < n; i++)
- {
- t[i] = int.Parse(Console.ReadLine());
- }
- for (j = 0; j < m; j++)
- {
- s[j] = int.Parse(Console.ReadLine());
- }
- for (j = 0; j < m; j++)
- {
- int ok = 0;
- for (i = 0; i < n && ok == 0; i++)
- {
- if ( s[j] == t[i] )
- ok = 1;
- }
- Console.WriteLine(ok + " ");
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement