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; }
Auto comment: topic has been updated by TanishqRJ (previous revision, new revision, compare).
where is return 0?? write return 0 at last bro inside
int main(){
return 0;
}
Try cahnging the submission language. You're submitting this solution with clang++17, try using GNU C++20. This is your submission in clang++17 192113254. This is it but in GNU C++20 192113074.
Thank you, didn't know about this, btw can you explain why didnt it worked
According to a cursory google search, clang++ simply uses that much memory because the diagnostics are very aggressive. They're available I suppose for technical reasons, because if your program gives WA or RE under certain conditions they are rejudged by that compiler.