From 67a2d554865d2012f2c8765f9769c0da42b392b7 Mon Sep 17 00:00:00 2001 From: sinaps07 Date: Thu, 6 Oct 2022 20:56:43 +0530 Subject: [PATCH] added some comments --- .../CPlusPlus/Dynamic-Programming/bookshopcses.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/algorithms/CPlusPlus/Dynamic-Programming/bookshopcses.cpp b/algorithms/CPlusPlus/Dynamic-Programming/bookshopcses.cpp index c28bb897..1f58fec8 100644 --- a/algorithms/CPlusPlus/Dynamic-Programming/bookshopcses.cpp +++ b/algorithms/CPlusPlus/Dynamic-Programming/bookshopcses.cpp @@ -1,5 +1,6 @@ //problem link //https://cses.fi/problemset/task/1158/ +//time complexity:O(n^2) #include using namespace std; @@ -44,4 +45,10 @@ int main() solve(); cout<<"\n"; } -} \ No newline at end of file +} +//sample input +// 4 10 +// 4 8 5 3 +// 5 12 8 1 +//sample output +//13 \ No newline at end of file