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 <bits/stdc++.h> | |
using namespace std; | |
#define INF 2000000000 | |
#define MOD 1000000007 | |
typedef long long ll; | |
typedef pair<int, int> P; | |
int main() | |
{ |
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 <bits/stdc++.h> | |
using namespace std; | |
#define INF 2000000000 | |
#define MOD 1000000007 | |
typedef long long ll; | |
typedef pair<int, int> P; | |
int main() { | |
int num = 5; |
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 <bits/stdc++.h> | |
using namespace std; | |
#define INF 2000000000 | |
#define MOD 1000000007 | |
typedef long long ll; | |
typedef pair<int, int> P; | |
int main() { | |
int num = 4; |
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 main() | |
{ | |
int mx = 10; | |
bool isprime[mx]; | |
for (int i = 0; i < mx; i++) { | |
isprime[i] = true; | |
} | |
for (int i = 2; i < mx; i++) { | |
for (int j = i*2; j < mx; j+=i) { | |
isprime[j] = false; |
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 <iostream> | |
#include <algorithm> | |
#include <vector> | |
#include <stack> | |
#include <string.h> | |
#include <stdio.h> | |
#include <queue> | |
using namespace std; |
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> | |
#include <vector> | |
using namespace std; | |
const int INF = 100000000; | |
#define MOD 1000000007 | |
typedef long long ll; |
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
subscription-manager register --username=rhn-support-knakayam --password=$PASSWORD | |
subscription-manager attach --pool=8a85f981576f2592015770330df347d9 | |
subscription-manager repos --disable='*' | |
subscription-manager repos --enable=rhel-7-server-rpms | |
subscription-manager repos --enable=rh-gluster-3-for-rhel-7-server-rpms | |
subscription-manager repos --enable=rh-gluster-3-samba-for-rhel-7-server-rpms | |
subscription-manager repos --enable=rh-gluster-3-nfs-for-rhel-7-server-rpms | |
# subscription-manager repos --disable=rh-gluster-3-samba-for-rhel-7-server-rpms | |
# subscription-manager repos --disable=rh-gluster-3-nfs-for-rhel-7-server-rpms |
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
public class segtree { | |
static int n; | |
static int data[]; | |
static int MAX_N = 1 << 17; | |
segtree(int n_) { | |
n = 1; | |
while (n < n_) n *= 2; | |
data = new int[2*MAX_N -1]; |
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
import java.io.*; | |
import java.util.*; | |
public class UnionFind { | |
static public class UF{ | |
int n; | |
int[] d; | |
UF(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
import java.util.*; | |
public class nap { | |
public static void main(String[] args) { | |
int N = 3; | |
int W = 7; | |
int w[] = {3,4,2}; | |
int v[] = {4,5,3}; | |
int s[][] = new int[N+1][W+1]; |