Created
February 12, 2016 19:08
-
-
Save abdalimran/9d4a8172bbb979b6c6e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Bismillah hir rahmanir raheem. Thanks to Allah for everything. | |
Coder: Abdullah Al Imran | |
Email: [email protected] */ | |
#include<bits/stdc++.h> | |
using namespace std; | |
typedef pair <int,int> pii; | |
#define x first | |
#define y second | |
pii extendedEuclid (int a, int b) | |
{ // returns x, y | ax + by = gcd(a,b) | |
if(b==0) | |
return pii(1,0); | |
else | |
{ | |
pii d = extendedEuclid(b, a%b); | |
return pii(d.y, d.x-d.y * (a/b)); | |
} | |
} | |
int main() | |
{ | |
ios_base::sync_with_stdio(false); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment