TanishqRJ's blog

By TanishqRJ, history, 14 months ago, In English

I tried this quetion and was getting Memory limit error: https://codeforces.com/problemset/problem/151/A There's no way this code will take more than 256megabytes Here's my code: https://codeforces.com/contest/151/submission/192111544 ---------------

OR

include

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; }

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it