From bbc58f205fc6920c45eb8c0760b4f51989d5572d Mon Sep 17 00:00:00 2001 From: pathakcodes <31039145+pathakcodes@users.noreply.github.com> Date: Mon, 15 Oct 2018 21:53:15 +0530 Subject: [PATCH 1/3] Create 1066E.cpp new solution --- 1066E.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 1066E.cpp diff --git a/1066E.cpp b/1066E.cpp new file mode 100644 index 0000000..bd0e727 --- /dev/null +++ b/1066E.cpp @@ -0,0 +1,17 @@ +#include +using namespace std; +const int mod=998244353; +int main(){ + int n,m,ans=0,sum=0,p=1; + cin>> n >>m; + string s,t; + cin>>s>>t; + for(int i=0;i Date: Mon, 15 Oct 2018 21:58:12 +0530 Subject: [PATCH 2/3] Create 1066F.cpp new solution --- 1066F.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 1066F.cpp diff --git a/1066F.cpp b/1066F.cpp new file mode 100644 index 0000000..5da843c --- /dev/null +++ b/1066F.cpp @@ -0,0 +1,36 @@ +#include +using namespace std; +typedef long long ll; +typedef pair PLL; +map > mp; +ll dis(PLL a,PLL b){ + return abs(a.first-b.first)+abs(a.second-b.second); +} +int main(){ + ll n; + scanf("%lld",&n); + for(ll i=0;i Date: Sat, 27 Oct 2018 03:02:54 +0530 Subject: [PATCH 3/3] Create 1073D.cpp Added a new solution --- 1073D.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 1073D.cpp diff --git a/1073D.cpp b/1073D.cpp new file mode 100644 index 0000000..d502d96 --- /dev/null +++ b/1073D.cpp @@ -0,0 +1,23 @@ +#include +using namespace std; +int main(){ + long long n,T; + long long a[200010],dc=0,ans=0; + cin>>n>>T; + for(int i=0; i<(int)n; i++) cin>>a[i]; + while(T>0){ + long long Tp=T,cn=0; + for(int i=0; i=a[i]){ + Tp-=a[i]; + cn++; + } + } + if(cn==0) break; + Tp=T-Tp; + long long mv=T/Tp; + ans+=mv*cn; + T-=mv*Tp; + } + cout<