You have unread notifications. Click here.

ATM DP Optimization Code

Loading ...
Start Coding
#include <iostream>
#include <vector>
using namespace std;
int vis[1000000]={1};
int main() {
-vector<int> x={5,2,1};
-int y = 10;
-for(int j=0; j<x.size() ; j++)
--for(int i=x[j]; i<=y; i++)
---vis[i] += vis[i-x[j]];
-cout<< vis[y] <<endl;


English Version


Answer the following questions according to what you learned from the video.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Comments & Feedback

ملحوظة يتم مراجعة التعليقات قبل ظهورها من قبل الإدارة. رجاء عدم كتابة نفس التعليق أكثر من مرة.
Back to Course