-
Notifications
You must be signed in to change notification settings - Fork 0
/
Maximum_Cupcakes.cpp
75 lines (67 loc) · 1.28 KB
/
Maximum_Cupcakes.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
63
64
65
66
67
68
69
70
71
72
73
74
75
// TSETEN RGIPT
// ΣDAY
#include <bits/stdc++.h>
#define ll long long int
using namespace std;
#define ll long long int
#define br << endl
#define pb push_back
#define rep(i, n) for (ll i = 0; i < n; i++)
#define repi(i, n) for (ll i = 1; i <= n; i++)
#define repii(i, n) for (ll i = 1; i < n; i++)
#define gcd __gcd
const ll MOD = 1e9 + 7;
// question rd k l
// constraits
// consider tc
// isse achha approach nhi melega bhai.
// Ye kab tk likhoge
ll gcd(ll a, ll b)
{
return (b == 0) ? a : gcd(b, a % b);
}
ll lcm(ll a, ll b)
{
return a * (b / gcd(a, b));
}
// Code Begins Here
bool cmp(const pair<ll, ll> a, const pair<ll, ll> b)
{
if (a.first == b.first)
return a.second < b.second;
else
return a.first > b.first;
}
int pred(ll a[], ll m, ll n, ll nop)
{
ll cop = 0;
rep(i, n)
{
cop += ceil((a[i] * 1.0) / m);
}
// cout << "cop: "<< " " << cop br;
if (cop <= nop)
return 1;
else
return 0;
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
ll _;
cin >> _;
while (_--)
{
ll n, k;
cin >> n >> k;
ll a[n];
ll mx = 2 * (1e9) + 1;
ll mp[mx] = {0};
rep(i, n){
mp[a[i]]++;
} cin >>
a[i];
}
return 0;
}