From 54b80ddf4b2fc2bad493ba99eef8426cd08a5bfc Mon Sep 17 00:00:00 2001 From: ShazidMahsrafi Date: Fri, 12 Jul 2024 19:31:12 +0600 Subject: [PATCH] feat: Add solutions for Codeforces problems 1992 A, B, and C --- Codes/1992 A - Only Pluses/1992A.cpp | 43 +++++++++++++++++ Codes/1992 B - Angry Monk/1992B.cpp | 47 +++++++++++++++++++ .../1992C.cpp | 46 ++++++++++++++++++ Readme.md | 3 ++ 4 files changed, 139 insertions(+) create mode 100644 Codes/1992 A - Only Pluses/1992A.cpp create mode 100644 Codes/1992 B - Angry Monk/1992B.cpp create mode 100644 Codes/1992 C - Gorilla and Permutation/1992C.cpp diff --git a/Codes/1992 A - Only Pluses/1992A.cpp b/Codes/1992 A - Only Pluses/1992A.cpp new file mode 100644 index 0000000..b513720 --- /dev/null +++ b/Codes/1992 A - Only Pluses/1992A.cpp @@ -0,0 +1,43 @@ +#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() +{ + vectorv(3); + cin>>v[0]>>v[1]>>v[2]; + for(int i=0; i<5; ++i) + (*min_element(all(v)))++; + cout<> TCS; + for (int TC = 1; TC <= TCS; ++TC) + { + // cout<<"Case "< +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,k; + cin>>n>>k; + vectorv(k); + for(auto &i:v) cin>>i; + sort(all(v)); + int ans=0; + for(int i=0; i> TCS; + for (int TC = 1; TC <= TCS; ++TC) + { + // cout<<"Case "< +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,m,k; + cin>>n>>m>>k; + for(int i=n; i>=m+1; --i) + cout<> TCS; + for (int TC = 1; TC <= TCS; ++TC) + { + // cout<<"Case "<