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