From 1216a6efe5fa60ee2ecf3cf66e22ae1d5d51bf11 Mon Sep 17 00:00:00 2001 From: ShazidMahsrafi Date: Fri, 12 Jul 2024 23:12:55 +0600 Subject: [PATCH] added 665B --- .../1665B.cpp | 64 +++ Readme.md | 503 +++++++++--------- 2 files changed, 316 insertions(+), 251 deletions(-) create mode 100644 Codes/1665 B - Array Cloning Technique/1665B.cpp diff --git a/Codes/1665 B - Array Cloning Technique/1665B.cpp b/Codes/1665 B - Array Cloning Technique/1665B.cpp new file mode 100644 index 0000000..d4c5b70 --- /dev/null +++ b/Codes/1665 B - Array Cloning Technique/1665B.cpp @@ -0,0 +1,64 @@ +#include +using namespace std; +#ifdef ONLINE_JUDGE +#define dbg(...) +#else +#include "Assets/debug.h" +#endif +#define int long long +#define ll long long +#define endl '\n' +#define ff first +#define ss second +#define ins insert +#define pb push_back +#define ppb pop_back +#define sz(x) (int)(x).size() +#define all(x) x.begin(), x.end() +#define rep(i,a,b) for(int i=a; i=b; --i) +#define yn(f) f? cout<<"YES\n":cout<<"NO\n" +#define FAST (ios_base::sync_with_stdio(false), cin.tie(nullptr)); +ll pow(ll x,ll y,ll m=1e9+7) {ll ans=1;x%=m;while(y){if(y&1)ans=(ans*x)%m;x=(x*x)%m;y>>=1;}return ans;} + +void solve() +{ + int n; + cin>>n; + mapm; + rep(i,0,n) + { + int x; + cin>>x; + m[x]++; + } + if(m.size()==1) + { + cout<<0<> TCS; + for (int TC = 1; TC <= TCS; ++TC) + { + // cout<<"Case "<