Congrats to @Dominator069 for becoming India's first LGM. You have been an inspiration for so many of us like me, and my name is inspired from you.
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | dXqwq | 3436 |
| 8 | Radewoosh | 3415 |
| 9 | Otomachi_Una | 3413 |
| 10 | Um_nik | 3376 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | adamant | 152 |
| 3 | Proof_by_QED | 146 |
| 3 | Um_nik | 146 |
| 5 | Dominater069 | 144 |
| 6 | errorgorn | 141 |
| 7 | cry | 139 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 9 | TheScrasse | 134 |
Congrats to @Dominator069 for becoming India's first LGM. You have been an inspiration for so many of us like me, and my name is inspired from you.
Can anyone plese help me out what is the issue in my code, just couldnt understand why is it giving wrong answer for this, logic seems to be correct I guess
My submission https://mirror.codeforces.com/contest/2116/submission/336427692
The problem https://mirror.codeforces.com/contest/2116/problem/B
I noticed something weird today, so I was solving one problem and I m attaching the question link along with the solution which I used
https://mirror.codeforces.com/contest/1832/problem/C
using namespace std; void fast_io() { ios::sync_with_stdio(false); cin.tie(0);
cout.tie(0); }
void dowork(ll int n, vector&arr){ if(count(arr.begin(),arr.end(),arr[0])==n){ cout<<1<<endl; return; } for(int i=0;i<arr.size()-1;i++){ if(arr[i]==arr[i+1]){ arr.erase(arr.begin()+i); i--; } } ll int cnt=2; ll int i=1; while(i<=n-2){ if(arr[i]>arr[i-1] && arr[i]>arr[i+1]){ cnt++; } else if(arr[i]<arr[i-1] && arr[i]<arr[i+1]){ cnt++; } i++;
} cout<<cnt<<endl; return;
}
int main(){ fast_io(); int t; cin>>t; while(t--){ ll int n; cin>>n; vectorarr(n); for(int i=0;i<n;i++){ cin>>arr[i]; } dowork(n,arr); } return 0; }
I know that I shoukdnt have used the delete function, since it can take the time complexity to O(N^2) when u delete that element and keep on shifting the remaining elements to the left, but I was tired so I just submitted it, and it got TLE on test 11 in C++ 23 Version, but surprisingly got accepted in C++ 20 Version, can anybody explain why did such thing happen?
Hi, I would like to get some advice on solving Geometry problems, more often than not I end up being clueless after reading the problem many times, I don't know how to improve upon this, looking for some help/content/advice pls
Same issue with Combinatorics as well for me
Could somebody give me some advice like how to become string at solving questions which are rated 1400+, I really suck at it. Thanks a lot
| Name |
|---|


