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
int A[MAX], N; | |
int partitions(int low, int high) { | |
int p=low, r=high, x=A[r], i=p-1; | |
for (int j=p; j<=r-1; j++) { | |
if (A[j]<=x){ | |
i=i+1; | |
swap(A[i],A[j]); | |
} | |
} |
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
while (unenm != 0) { | |
while (men[j] != -1) | |
j++; //man no. j is unengaged. he proposes to men2[j]. | |
int wc = m[j][men2[j]]; | |
if (women[wc] == -1){ //wc and j get engaged | |
women[wc] = j; | |
men[j] = wc; | |
unenm --; | |
j = 0; | |
} else if (w[wc][women[wc]] > w[wc][j]) { |
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
#include <iostream> | |
#include <vector> | |
#include <stack> | |
#include <queue> | |
#include <algorithm> | |
#include <cstdio> | |
using namespace std; | |
struct compare { |
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
/* | |
* Author : JAYAPRAKASH S | |
* Maximum liklihood estimator for Laplace density function | |
* Mail : first_name [at] cse [dot] iitb [dot] ac [dot] com | |
* Please mail me, if any error is found. | |
*/ | |
import java.util.ArrayList; | |
import java.util.Collections; |
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
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
class _x{ | |
public: int s, e, p,m; | |
}VAL[10005]; | |
int N; |
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
#include <iostream> | |
#include <cstring> | |
#include <algorithm> | |
using namespace std; | |
const long long int mod = 1000000007; | |
class _matrix{ | |
public: | |
long long int x[2][2]; | |
int n,m; |
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
#include <iostream> | |
#include <cstring> | |
#include <stack> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
char str[]="ALLIZZWELL"; | |
int v[105][105]; |
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
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
const int MAX=100025; | |
int N,A,B; | |
int v[MAX]; | |
int min2(int a, int b) { |
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
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
const int MAX=100025; | |
class _x{ | |
public: | |
int s,e; | |
}v[MAX]; |
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
#include <iostream> | |
#include <cstring> | |
#include <stack> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
char str[]="ALLIZZWELL"; | |
int v[105][105]; |
OlderNewer