Comments

it's not crazy if it true ;)

that's a really good idea , will surely consider that , thanks for checking it out!

happy new year to you too!

what issue are you facing? :/

On pskobxCodeforces Round 991 (Div. 3), 16 months ago
0

Ahh..so good to see so much progress!!

0

hey man! ->thanks for letting me know about the year active thing , fixed it! ->as far as it comes to the 2nd issue , i'm pretty sure there is something wrong with data especially with the "VK cup" ones, i'll try to give it a fix as soon as possible !

lemme know if you have any other recommendations ! ;)

+1

big bren time

0

can anyone help me out in the "F" problem , i got stuck in the 6th testcase, like shouldn't the answer be 6 when the trap is placed at position "24" Help me out!

this is my approach

int32_t main() {
    int t;
    cin >> t;
    while (t--) {
       int n;
       cin>>n;
       vector<int>nums(n ,0);
       unordered_map<int , int>m;
       for(int i=0 ; i<n ; i++) 
       {
           cin>>nums[i];
       }
       int ans=INT_MIN;
       int pos=0;
       for(int i=0 ; i<n ; i++)
       {
            int temp=n;
            int x=0;
            while(temp--)
            {
                cout<<x<<"  ";
                m[x]++;
                if(x!=0) 
                {
                    if(m[x]>=ans)
                    {
                        ans=m[x];
                        pos=x;
                    }
                }
                x+=nums[i];
            }
            cout<<endl;
       }
       
       cout<<"answer :"<<ans<<endl;
       cout<<"pos :"<<pos<<endl;
    }

    return 0;
}