Not able to understand how to do something on CodeChef? Create a new topic here.
when i pratice code some time i came back resume my were i stoped but it starts from stating i begin
okay varun thanks for giving response
i was solving a problem and Successfully executed it but when i submit .
it says “skipped testfile” what should i do?
also help for how to do subtasks?
for which problem it is showing
print f
i just want to know what is error in my code
link - Table Strength Practice Coding Problem - CodeChef
my code is :
include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin >> t;
while (t–)
{
int n;
cin >> n;
vector < int > a(n);
for (int i = 0; i < n; i++)
{
cin >> a[i];
}
sort(a.rbegin(), a.rend());
float ans = a[0], m = 2;
for (int i = 1; i < n; i++)
{
if (a[i] * m >= ans)
{
ans = a[i]*m;
m += 1;
}
// else continue;
}
cout << ans << endl;
}
}
hyyie
sort(a.rbegin(), a.rend());
remove r from sorting
LIKE THIS:
sort(a.begin(), a.end());
BRO CAN YOU SHOW ME YOUR CODES FOR BETTER UNDERSTANDING>
Can anyone help? I was wrongfully flagged for plagiarism in the last contest, so I emailed CodeChef. They have acknowledged the mistake and are in the process of removing the plagiarism penalty. This will be corrected within a week. Currently, I have been moved to Division 4 from Division 2. Can I participate in today’s contest, or should I wait until the issue is fully resolved?
just open the project final look and make it in vs code
I want to know how to unlock for solving problems ?