From 292714ad4df12a6a5f761cd74b9e5f64111518a8 Mon Sep 17 00:00:00 2001 From: ShazidMahsrafi Date: Mon, 22 Apr 2024 02:25:22 +0600 Subject: [PATCH] added 1957A and B --- Codes/1957 A - Stickogon/1957A.cpp | 46 ++++++++++++++++ .../1957B.cpp | 53 +++++++++++++++++++ Readme.md | 15 ++++-- 3 files changed, 109 insertions(+), 5 deletions(-) create mode 100644 Codes/1957 A - Stickogon/1957A.cpp create mode 100644 Codes/1957 B - A BIT of a Construction/1957B.cpp diff --git a/Codes/1957 A - Stickogon/1957A.cpp b/Codes/1957 A - Stickogon/1957A.cpp new file mode 100644 index 0000000..7d0014d --- /dev/null +++ b/Codes/1957 A - Stickogon/1957A.cpp @@ -0,0 +1,46 @@ +#include +using namespace std; +#ifndef ONLINE_JUDGE + #include "Debug.h" +#else + #define dbg(...) +#endif +#define ll long long +#define ull unsigned long long +#define endl '\n' +#define ff first +#define ss second +#define pb push_back +#define all(x) x.begin(), x.end() +#define sz(x) (int)(x).size() +#define yes cout<<"YES"<>=1;} return ans;} + +void solve() +{ + int n; + cin>>n; + mapm; + for(int i=0; i>x; + m[x]++; + } + int ans=0; + for(auto x:m) + ans += x.ss/3; + cout<> TC; + while (TC--) solve(); +} \ No newline at end of file diff --git a/Codes/1957 B - A BIT of a Construction/1957B.cpp b/Codes/1957 B - A BIT of a Construction/1957B.cpp new file mode 100644 index 0000000..26edec8 --- /dev/null +++ b/Codes/1957 B - A BIT of a Construction/1957B.cpp @@ -0,0 +1,53 @@ +#include +using namespace std; +#ifndef ONLINE_JUDGE + #include "Debug.h" +#else + #define dbg(...) +#endif +#define ll long long +#define ull unsigned long long +#define endl '\n' +#define ff first +#define ss second +#define pb push_back +#define all(x) x.begin(), x.end() +#define sz(x) (int)(x).size() +#define yes cout<<"YES"<>=1;} return ans;} + +void solve() +{ + int n,k; + cin>>n>>k; + if(n==1) + { + cout<> TC; + while (TC--) solve(); +} \ No newline at end of file diff --git a/Readme.md b/Readme.md index b2a6d4c..6fa57a3 100644 --- a/Readme.md +++ b/Readme.md @@ -300,13 +300,18 @@ This repository contains my solutions of Codeforces problems. They are in C++ la | 288 | 1956 A | Nene's Game | [Question](https://codeforces.com/problemset/problem/1956/A) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/1956%20A%20-%20Nene's%20Game) | 289 | 1956 B | Nene and the Card Game | [Question](https://codeforces.com/problemset/problem/1956/B) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/1956%20B%20-%20Nene%20and%20the%20Card%20Game) | 290 | 1956 C | Nene's Magical Matrix | [Question](https://codeforces.com/problemset/problem/1956/C) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/1956%20C%20-%20Nene's%20Magical%20Matrix) +| 291 | 1957 A | Stickogon | [Question](https://codeforces.com/problemset/problem/1957/A) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/1957%20A%20-%20Stickogon) +| 292 | 1957 B | A BIT of a Construction | [Question](https://codeforces.com/problemset/problem/1957/B) | [Solution](https://github.com/ShazidMashrafi/Codeforces-Solutions/tree/master/Codes/1957%20B%20-%20A%20BIT%20of%20a%20Construction) +# Codeforces Solutions +This repository contains my solutions of Codeforces problems. They are in C++ language. - +#### If this repository helped you out, please consider giving it a :star: -## About Me :eyes: +
-I am Shazid Mashrafi. -I am currently studying Computer Science and Engineering & trying to work my way up in the programming world. -Visit my [Website](https://shazidmashrafi.com) and [Codeforces](https://codeforces.com/profile/ShazidMashrafi) account. \ No newline at end of file +## Index +#### Sorted by Problem ID +| Index | Problem ID | Problem Name | Question | Solution | +| :-----: | :--------: | :----------: | :------: | :------: | \ No newline at end of file