Ask Sawal

Discussion Forum
Notification Icon1
Write Answer Icon
Add Question Icon

What is acmsguru in codeforces?

2 Answer(s) Available
Answer # 1 #

Nonetheless, Codeforces team is regularly asked to revive acmsguru, since there is still a lot of interest in the problemset. I think I have been just randomly practicing from codeforces to topcoder to SPOJ to GCJ. You may give the category/type or hint or algorithm/data structure needed to solve the problem in spoiler. And what do you mean by Codeforces problems? While CF rounds are not so diverse, you have several hundred contests available in gym,.

[7]
Edit
Query
Report
Atiksh Pradhan
Self-proclaimed movie critic
Answer # 2 #

Can anyone hel me? I got WA 20. I used linear Diophantine equation and extended Euclidian algorithms from cp-algorithms.com, but I got WA. These are links that I used:

My code is :

#include #define PII pair #define db(x) cerr<<#x<<"="<

using namespace std;

ll gcd(ll a,ll b,ll &x,ll &y) { if(a==0) { x=0; y=1; return b; } ll x1,y1; ll d=gcd(b%a,a,x1,y1); x=y1-(b/a)*x1; y=x1; return d; }

bool find_any_solution(ll a,ll b,ll c,ll &x0,ll &y0,ll &g) { g=gcd(abs(a),abs(b),x0,y0); if(c%g) return false; x0*=c/g; y0*=c/g; if(a<0) x0=-x0; if(b<0) y0=-y0; return true; }

void shift_solution(ll &x,ll &y,ll a,ll b,ll cnt) { x+=cntb; y-=cnta; }

PII find_all_solution(ll a,ll b,ll c,ll minx,ll maxx,ll miny,ll maxy) { ll x,y,g; PII res= {-1,-1}; if(!find_any_solution(a,b,c,x,y,g)) return res; a/=g; b/=g;

}

[1]
Edit
Query
Report
Waluscha Shields
DIRECTOR EDUCATION

Related Questions

No More Questions available at this moment!