-
Notifications
You must be signed in to change notification settings - Fork 0
/
614-MarkLand.cpp
50 lines (49 loc) · 1.4 KB
/
614-MarkLand.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
#include<stdio.h>
#include<bits/stdc++.h>
#include<vector>
using namespace std;
int main()
{
int n,s,k,noT,item;
cin>>noT;
vector<int> actual;
vector<int> a;
vector<int> result;
while(noT--)
{
//cout<<"Hello";
cin>>n>>s>>k;
for(int i=0;i<k;i++)
{
cin>>item;
a.push_back(item);
}
for(int i=1;i<=n;i++)
actual.push_back(i);
int flag=0;
for(int i=0;i<n;i++)
{
for(int j=0;j<k;j++)
{
if(actual[i]==a[j])
{
flag=1;
break;
}
else{
flag=0;
}
}
if(flag==0)
{
//cout<<"Into";
result.push_back(actual[i]-s);
}
}
for(int i=0;i<result.size();i++)
{
cout<<result[i];
}
}
return 0;
}