joyz09's blog

By joyz09, history, 8 months ago, In English
#include <iostream>
using namespace std;

int main(){
    int t;
    cin >> t;
    while(t--){
        int n;
        cin >> n;
        long m = (long)INT_MAX;
        while(n--){
            long b;
            cin >> b;
            if(b <= m){
                m = b;
            }else{
                if(b > 2*m-1){
                    cout << "NO" << endl;
                    break;
                }
            }
            if(n==0) cout << "YES" << endl;
        }
    }
    return 0;
}

https://mirror.codeforces.com/problemset/problem/2128/C

It always shows wrong in test case 2 token 46 The test case is n = 3 1 2 2

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By joyz09, history, 8 months ago, In English

Hi, I'm rated (396), but I can't view any users' source code — even for old problems like 1A. It just shows “Source: N/A” for every submission.

I've checked across multiple browsers and devices, and other accounts (even unrated) can see the code.

There's no "Hide source code" option in my submissions page or settings.

Can someone please check if something is wrong with my account visibility settings?

Handle: jay09agarwal

Thanks in advance!

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it