-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcatfeed.cpp
62 lines (54 loc) · 1.12 KB
/
catfeed.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
//
// catfeed.cpp
// codechef
//
// Created by Tanishq Chamola on 28/10/19.
// Copyright © 2019 Tanishq Chamola. All rights reserved.
//
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
/*
int main()
{
unsigned int t;
cin>>t;
while(t--)
{
unsigned int n,m;
cin>>n>>m;
unsigned int arr[m];
vector<int> check;
for (int i=0; i<m; i++)
{
cin>>arr[i];
}
int count=0;
for (int j=0; j<m; j++)
{
if ( binary_search(check.begin(), check.end(), arr[j]) == 0 )
{
count++;
if (count%n == 0)
{
check.clear();
continue;
}
check.push_back(arr[j]);
sort(check.begin(),check.end());
}
else
{
cout<<"NO"<<endl;
break;
}
}
if (count==m)
{
cout<<"YES"<<endl;
}
}
return 0;
}
*/