mrinmoy66sadhukhan's blog

By mrinmoy66sadhukhan, history, 4 months ago, In English

Nothing useful to say.. I just love the sparkly christmasy wintery theme with the snowflake thingy design and also the little changes like when you submit a solution and it says "Happy New Year!" and also the thing where you can change your rank!!! I love these little things.. they make me happy..I'm glad they exist.. I was missing this I knew this happens every year.. I was waiting for this.. I think it happened a little late this year but Idk I might be wrong.. Anyways.. Happy Christmas and New Year!! Very grateful for the CF community! ^-^

Full text and comments »

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

By mrinmoy66sadhukhan, history, 5 months ago, In English

So there's this question 1995C - Квадратирование

It basically asks to count how many times we need to square elements at different indexes .. such that the whole array becomes non decreasing..

I've reduced it down to a math formula that goes like this

k[i] = k[i-1] + (ceil(log2(log2(a[i-1])) - log2(log2(a[i])))

here k[i] is the number of times i need to square at index i..

i reached here by writing an inequality in terms of a[i] powered (2^k[i]).. and same for a[i-1] and then took log2 of both sides. below is my code that implements this solution..

352427954

heres the main block of code from my solution:

 int cnt = 0;
    int prev = 0;
    for(int i=2;i<=n;i++) {
        if(arr[i]==1 && arr[i-1]>1) {
            cout<<-1<<"\n";
            return;
        }
        if(arr[i-1]==1) continue;
        long double a = log2(arr[i-1]);
        long double b = log2(arr[i]);
        int ax2 = prev  + ((int)ceil(log2(a) - log2(b)));
        ax2 = max(0ll, ax2);
        cnt += ax2;
        prev = ax2;
    }
    cout<<cnt<<"\n";

I however am getting a WA on some test case when i submit this solution... Is there some flaw in my logic? I'm pretty sure I understood the question correctly.. Perhaps there's some cases I am not considering? I know that the computer is not accurate when it comes to floating point precisions.. Is that the problem? I'd appreciate any help.. Thank you in advance.

Full text and comments »

By mrinmoy66sadhukhan, 7 months ago, In English

Not full proof but i think this will help..

Method 1:

More interactive problems. I think interactive problems are more difficult for AI to solve.

Method 2:

Only one submission allowed per question.. Very harsh but this will stop cheaters from giving repeated prompts.. This will also make contest more tough.. less correct submissions.

Method 3:

Well, not really a method.. but I think if problems are described in more verbose manner.. in more informal way.. rather than formal way.. and we are forced to interpret input/output on our own.. then question will be more difficult for AI..

Thank you for reading.

Full text and comments »

  • Vote: I like it
  • -25
  • Vote: I do not like it