I tried this quetion and was getting Memory limit error: https://codeforces.net/problemset/problem/151/A↵
There's no way this code will take more than 256megabytes↵
Here's my code:↵
--------------- https://codeforces.net/contest/151/submission/192111544↵
--------------- ↵
OR↵
------------------↵
↵
#include<iostream>↵
#include<bits/stdc++.h>↵
using namespace std;↵
int main()↵
{↵
int n,k,l,c,d,p,nl,np;↵
cin >> n >> k >>l >> c >> d >> p >> nl >> np;↵
k = k * l/nl;↵
c = c * d;↵
p = p / np;↵
cout<<min(k, min(c, p))/n;↵
}
There's no way this code will take more than 256megabytes↵
Here's my code:
---------------
--------------- ↵
OR↵
------------------↵
↵
#include<iostream>↵
#include<bits/stdc++.h>↵
using namespace std;↵
int main()↵
{↵
int n,k,l,c,d,p,nl,np;↵
cin >> n >> k >>l >> c >> d >> p >> nl >> np;↵
k = k * l/nl;↵
c = c * d;↵
p = p / np;↵
cout<<min(k, min(c, p))/n;↵
}