183368493 please see my solution and tell me why i get run time error please dont ignore i am dugging this more than hours PLEASE!!!
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 151 |
183368493 please see my solution and tell me why i get run time error please dont ignore i am dugging this more than hours PLEASE!!!
https://codeforces.net/contest/1225/my 182321559 any body tell me why there is overflow
https://codeforces.net/contest/1539/problem/A i am not able to solve the problem because of constraints the first solution is this
using namespace std; void solve(){ ll n,x,t; cin>>n>>x>>t; int v[n]={0}; for(int i=1;i<n;i++) v[i]=v[i-1]+x; // for(auto i:v) cout<<i<<" "; // cout<<endl; int vv[n]={0}; for(int i=0;i<n;i++) vv[i]=v[i]+t; // for(auto i: vv ) cout<<i<<" "; // cout<<endl; ll sum=0; for(int i=0;i<n-1;i++){ ll upper1 = upper_bound(v, v+n, vv[i]) — v; sum+=upper1-i-1; } cout<<sum<<endl;
} int main() { int tc; cin>>tc; while(tc--){ solve(); } } 2.nd solution is this
using namespace std; void solve(){ ll n,x,t; ll ans=(max(0ll,(n-t)/x)*(t/x))+min((n-1),t/(x-1))*(min(n,(t/x)))/2; cout<<ans<<endl;
} int main() { int tc; cin>>tc; while(tc--){ solve(); } } IN FIRST ONE IT SHOWS RUN TIME ERROR BECOZ OF CONSTRAINT AND IN 2ND IT SHOWS RANDOM NUMBER MAY BE BECAUSE OF 0LL HELP ME PLEASE!!!!1:(
plz any body gives me list of some common patterns in question ask in rounds and some technique please dont ignore this persons who give me the list or some ideas has some positive DELTA in their next round ?
If in contest i submit my problem 5 times and its is unaccepted submission and after that problem statment chnge due to some error does my previos 5 submission matter or it just discarted.. because it is not my fault.
What i do my codeforces telegram link is not working
many times i come up with solution some times the solution is brute force and some time it is optimised one. but onces i am done with the problem.(i.e accepted) one question is always strick in my mind that WHY MY SOLUTION IS TRUE.. how do i proof that it is always give me the correct ans....... so that is why i am always in delema that i dont understand the problem and solution well enough SO ANY SUGGESTION..(my english is weak XD sorry!!)
2 days back i answered 3 question in div-4 contest but today i recieve a message in my box that says you copy the code of question 3 from some random person but this is not true and the system dequalified me for that round i.e there is no + in my rank what should i do then.. any suggestion
Name |
---|