Блог пользователя farmaan_khan

Автор farmaan_khan, история, 17 месяцев назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор farmaan_khan, история, 17 месяцев назад, По-английски
  • Проголосовать: нравится
  • -4
  • Проголосовать: не нравится

Автор farmaan_khan, история, 18 месяцев назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • -23
  • Проголосовать: не нравится

Автор farmaan_khan, история, 18 месяцев назад, По-английски

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 ?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится

Автор farmaan_khan, история, 19 месяцев назад, По-английски

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.

Полный текст и комментарии »

  • Проголосовать: нравится
  • -16
  • Проголосовать: не нравится

Автор farmaan_khan, история, 21 месяц назад, По-английски

What i do my codeforces telegram link is not working

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор farmaan_khan, история, 22 месяца назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор farmaan_khan, история, 22 месяца назад, По-английски

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

Полный текст и комментарии »

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится