From ff0c878c3065a735a4a6b262ddd9bf6bda5c5a14 Mon Sep 17 00:00:00 2001 From: Narcotics101 Date: Sun, 3 Oct 2021 19:52:22 +0530 Subject: [PATCH] Added GCD_length c++ program --- .../C++_Programs/B_GCD_Length.cpp | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Program's_Contributed_By_Contributors/C++_Programs/B_GCD_Length.cpp diff --git a/Program's_Contributed_By_Contributors/C++_Programs/B_GCD_Length.cpp b/Program's_Contributed_By_Contributors/C++_Programs/B_GCD_Length.cpp new file mode 100644 index 0000000000..6036613a14 --- /dev/null +++ b/Program's_Contributed_By_Contributors/C++_Programs/B_GCD_Length.cpp @@ -0,0 +1,69 @@ +#include + +#define pb push_back +#define mp make_pair +#define fr first +#define sc second +#define clr(a) memset(a, 0, sizeof(a)) +#define sz(x) x.size() +#define rep(n) for (ll i = 0; i < n; i++) +#define repc(i, n) for (ll i = 0; i < n; i++) +#define FOR(i, x, y) for (int i = x; i < y; i++) +#define DEC(i, x, y) for (int i = x; i >= y; i--) +#define all(v) v.begin(), v.end() +#define min3(a, b, c) min(a, min(b, c)) +#define max3(a, b, c) max(a, max(b, c)) +#define alla(a, n) a, a + n + +using namespace std; + +// Some typedef's +typedef long long ll; +typedef unsigned long long ull; +typedef pair ii; +typedef vector vi; +typedef vector vii; + +// Some frequently used functions +template +T modpow(T base, T exp, T modulus){ + base %= modulus; T result = 1; + while(exp > 0){ + if(exp & 1) result = (result * base) % modulus; + base = (base * base) % modulus; + exp >>= 1; + } + return result; +} +ll lcm(ll a, ll b) { return (a * (b / __gcd(a, b))); } +//Repeat,Example,Approach,Code,Testcases,Optimize +// int overflow, array bounds special cases (n=1?) +// do smth instead of nothing and stay organized +// WRITE STUFF DOWN DON'T GET STUCK ON ONE APPROACH + +// Some constants +const int inf = 1e9 + 7; +const double eps = 1e-6; +const double pi = 1.00 * acos(-1.00); + + + +void solve(){ + int a,b,c; + cin >> a >> b >> c; + // odd + odd = even + // even + odd = odd + // odd + even = odd + // even + even = even; + int n, + +} + +int main(){ + ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL) ; + int t; + cin >> t; + while(t--){ + solve(); + } +} \ No newline at end of file