From 368f04d46a0d5b56cbe98893de541853427e0bb0 Mon Sep 17 00:00:00 2001 From: Saumya-Agarwal29 <56381207+Saumya-Agarwal29@users.noreply.github.com> Date: Wed, 19 Oct 2022 10:51:32 +0530 Subject: [PATCH] Create 365B.cpp added solution of codeforces 365B --- CP Solutions/Codeforces/365B.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 CP Solutions/Codeforces/365B.cpp diff --git a/CP Solutions/Codeforces/365B.cpp b/CP Solutions/Codeforces/365B.cpp new file mode 100644 index 0000000..fc6be60 --- /dev/null +++ b/CP Solutions/Codeforces/365B.cpp @@ -0,0 +1,30 @@ +/*-----Question Link------*/ +http://codeforces.com/contest/365/problem/B +/*------------------------*/ + +#include +#define FAST cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(0) +using namespace std; + +int main() +{ +FAST; +inti(n); +long a[n]; +for(int i=0;i>a[i]; +int t=2,m=2;; +for(int i=2;im) + m=t; + t=2; + } +}if(t>m) +m=t; +cout<