farmaan_khan's blog

By farmaan_khan, history, 16 months ago, In English

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!!!

Full text and comments »

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

By farmaan_khan, history, 16 months ago, In English
  • Vote: I like it
  • -4
  • Vote: I do not like it

By farmaan_khan, history, 16 months ago, In English

https://codeforces.com/contest/1539/problem/A i am not able to solve the problem because of constraints the first solution is this

include <bits/stdc++.h>

define ll long long

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

include <bits/stdc++.h>

define ll long long

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:(

Full text and comments »

  • Vote: I like it
  • -23
  • Vote: I do not like it

By farmaan_khan, history, 17 months ago, In English

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 ?

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it

By farmaan_khan, history, 18 months ago, In English

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.

Full text and comments »

  • Vote: I like it
  • -16
  • Vote: I do not like it

By farmaan_khan, history, 20 months ago, In English

What i do my codeforces telegram link is not working

Full text and comments »

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

By farmaan_khan, history, 21 month(s) ago, In English

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!!)

Full text and comments »

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

By farmaan_khan, history, 21 month(s) ago, In English

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

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it