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 | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
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.me/contest/1225/my 182321559 any body tell me why there is overflow
https://codeforces.me/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 |
---|