Total Problem Solved

Hi Friends,

Is there a way I can track the # of problems (both in contest and practice) that I solved at CodeChef? I used to be able to do it from my Profile page but it’s no longer possible (i.e. no total count of problems I solved in contest.)

Thank you!

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

}

Hi, may be here (below) 2 issue (I think) ?
C++

// 1
    while(t > 0){
    //....
    t = t - 1;
    }
    //2
    float ans = a[0], m = 2;

// and the solution could be this?

    float ans;      // than I have to understand why everybody use "ans" 
    float m = 2;  // as a variable name (and what it mean...)
    ans = (float)a[0];
hope this is helpfull bye 
(I verified and got "Status :Successfully executed" at link of problem you provided)

may try sqrt( Σ (n1^2, n2^2, n3^2, n4^2… nx^2) to reduce test cases…

There’s a 3^{rd}-party website that keeps track of the problems solved across major Platforms. You can register on it and check after a while (example).

1 Like

Great. Thank you so much!

1 Like

@wjli You can now check your total problem solved count on user profile page of the bottom left side.

2 Likes