# | User | Rating |
---|---|---|

1 | tourist | 3845 |

2 | jiangly | 3707 |

3 | Benq | 3630 |

4 | orzdevinwang | 3573 |

5 | Geothermal | 3569 |

5 | cnnfls_csy | 3569 |

7 | jqdai0815 | 3532 |

8 | ecnerwala | 3501 |

9 | gyh20 | 3447 |

10 | Rebelz | 3409 |

# | User | Contrib. |
---|---|---|

1 | maomao90 | 171 |

2 | adamant | 163 |

3 | awoo | 162 |

4 | nor | 153 |

5 | maroonrk | 152 |

6 | -is-this-fft- | 151 |

7 | TheScrasse | 150 |

8 | atcoder_official | 145 |

8 | Petr | 145 |

10 | pajenegod | 144 |

**During contest I really get nervous and I lost my concentration** and the two main reasons which I find for that are :-

1. **Getting WA** on solution I submit

2. Seeing the **leaderboad with thousands of submission** and I am not able to figure out the solution of that question

The following reasons lead to silly mistakes or mistakes which you generally don't do ( i.e. missing the constraints of question etc)

In the last contest #Codeforces round 694 Div 2 due to silly mistakes I got wrong answer on

**Problem A**( System test Failed ) and WA on**Problem B**.

Here are my solution with WA and AC :-

1. Problem A which **failed system test** ( https://codeforces.com/contest/1471/submission/103419176 )

2. Problem A which got **AC** ( https://codeforces.com/contest/1471/submission/103465431 )

- The mistake I did here is I forgot the
**constrains of 'x'**

- Problem B which got
**WA**( https://codeforces.com/contest/1471/submission/103431767 ) - Problem B which got
**AC**( https://codeforces.com/contest/1471/submission/103464987 )

This is one the most silly mistake that I did in the

**following condition ( if( P[i].first % x) ) is I use '2' in place of 'x'**as , in hurry I considered the sample case with x=2 ( I don't know how can I do so ).Comedy part is I just

**solved problem C**too which I was not able to come up with solution during contest .

** I want suggestions on How to tackle these problems of anxiety and be more focused and concentrated during contest ??**

I am confused ,which path should I follow out of these :-

should I practise question based on algorithms like I should search for particular type of algorithm and do lots of question of it after learning the algorithm from :-https://codeforces.com/problemset or https://cp-algorithms.com/ .

should I practise question based on difficulty from :- https://www.a2oj.com/Ladders.html and learn algorithm which come on my way of solving question .

I loved the first way but the problem is there are lot of algorithms and in which sequence should I learn them I don't know .please help.

Here is the question :-https://codeforces.com/contest/1270/problem/B

what i understood from the question that we need to find subarrays such that the difference of maximum and minimun element is equal to N (total emenets of array ) ,if it is not possible print "NO" else print "YES" and in next line print 1 and 'ending index' but if we are given an array 'A' and it is statifying condition max(A)-max(B)>=N then according to question answer should be 'YES' 1 N(size of array)

which we even need to check for subarray ?that's all I understood from question please help me out in understanding correctly

here's my code:- ```

using namespace std;

int main() { int t; cin>>t; while(t--) { int n,f=0; cin>>n;

int A[n],i,j,min=0,max=0,l,r; for(i=0;i<n;++i) { cin>>A[i]; if(max<A[i]) { max=A[i]; //finding max } } min=A[0]; for(i=1;i<n;++i) { if(min>A[i]) { min=A[i]; //finding min } } if(max-min>=n) //checking condition max(A)-min(A)=n { for(i=0;i<n;++i) { if(A[i]==min) //checking at what index is min and max present { l=i+1; //adding 1 in index as index taken from 0 to n-1 } if(A[i]==max) { r=i+1; } } if(l<r) //checking which is greater and printing accordingly { cout<<"YES"<<endl; cout<<l<<" "<<r<<endl; } else { cout<<"YES"<<endl; cout<<r<<" "<<l<<endl; } } else { cout<<"NO"<<endl; } } return 0;

}```

Codeforces (c) Copyright 2010-2024 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/23/2024 13:27:21 (j3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|