Блог пользователя -..-

Автор -..-, история, 3 часа назад, По-английски

Lately, whenever I try to open a submission, Cloudflare sometimes stops me for verification. I prove I'm human, and as a reward, it teleports me to the Codeforces homepage. Thanks, I guess? I never asked for a tour.

The worst part is when this happens during contests. Sometimes I just need to check one of my previous submissions, and suddenly I'm busy proving my humanity while the clock keeps ticking. Cloudflare is quietly eating my contest time, and my rating is paying the price.

And honestly, who's scraping my submissions mid-contest? What would a bot even do with my WA on test 2? Judge me? (If it does, it's not the only one.)

AtCoder seems to handle this differently by preventing Cloudflare challenges for contestants during contests. Could Codeforces consider something similar?

Here's my humble request: Codeforces, please nerf Cloudflare, at least for rated participants during contests. Let us check our own submissions without a surprise identity crisis.

Thanks for reading! Let me know if you've faced the same issue—or if you're secretly a bot.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +6
  • Проголосовать: не нравится

Автор -..-, история, 2 года назад, По-английски

987C - Three displays

in this problem, in an array S we need to find three indices (i<j<k) such that 1<=(i,j,k)<=n && Si < Sj < Sk... there is another array C.. && the sum of (Ci,Cj,Ck) should be minimum...

my implementation is below..

define N 1000000007

vector a(3000),c(3000);

vector<vector> dp(3001,vector (4,-1));

ll f(int i,int p,int mx){

if(p==0)    return 0;

 if(i==0){
    if(p==1 && a[0]<mx)     return c[0];
    return N;
 }

 if(dp[i][p]!=-1)    return dp[i][p];

 ll pick=N;
 if(a[i]<mx){
    pick=0ll+c[i]+f(i-1,p-1,a[i]);
 }
 ll no_pick=f(i-1,p,mx);
 return dp[i][p]=min(no_pick,pick);

}

int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

int n;      cin>>n;
for(int i=0;i<n;i++)    cin>>a[i];
for(int i=0;i<n;i++)    cin>>c[i];
int ans=f(n-1,3,N);
cout<<(ans==N?-1:ans)<<nl;

return 0;

}

for the test case ,

5

2 4 5 4 10

40 30 20 10 40

the answer is: 90 but my output is: 70

why is my code is not giving the right output.. where should I make a change??

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор -..-, история, 2 года назад, По-английски

I have been doing Codeforces (CF) for 6 months. Most of the time, I solve A and B problems of Div2 contests within 1 hour. I want to increase my speed and improve my ability to solve more problems during Div2 contests. For that, I want to practice only on CF. Actually, the problems on AtCoder and SPOJ seem harder and boring to me.

So, can practicing only on CF help me improve my problem-solving ability?

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится