-
Notifications
You must be signed in to change notification settings - Fork 0
/
everywhere.cs
61 lines (56 loc) · 1.43 KB
/
everywhere.cs
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string a = Console.ReadLine();
int tc;
int.TryParse(a, out tc);
int i = 0;
while(i<tc)
{
string b = Console.ReadLine();
int n;
int.TryParse(b, out n);
string[] city = new string[n];
int x = 0;
while (x<n)
{
city[x] = Console.ReadLine();
x += 1;
}
int v = 0;
while(v<n)
{
int w = v + 1;
while (w<n)
{
if(city[v]==city[w])
{
city[w] = null;
}
w += 1;
}
v++;
}
int r = 0,indeks=0;
while(r<n)
{
if(city[r]!=null)
{
indeks += 1;
}
r++;
}
Console.WriteLine(indeks);
i++;
}
}
}
}