This file contains hidden or 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
Обоснования применения технологий | |
# REDIS | |
Обоснование выбора технологии: | |
Небходимость хранить теги | |
Нужны каналы для риалтайм сообщений | |
Использовано в качестве: | |
Теги | |
Реляционные БД не очень подходят для хранения тегов |
This file contains hidden or 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<vector> | |
#include<math.h> | |
#include<iostream> | |
#include<utility> | |
struct Pair { | |
int elem; | |
int index; | |
Pair(int e, int i) : elem(e), index(i) {} | |
Pair() : elem(0), index(0) {} |
This file contains hidden or 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> | |
using namespace std; | |
struct CNode { | |
CNode(int k) : | |
key(k), left(NULL), right(NULL), height(1) | |
{ | |
} | |
int key; |
This file contains hidden or 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> | |
using namespace std; | |
struct CNode { | |
CNode(int k) : | |
key(k), height(1), count(1), | |
Left(NULL), Right(NULL) | |
{ | |
} |
This file contains hidden or 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 "math.h" | |
using namespace std; | |
#define INT_MAX1 2147483647 | |
class Elem{ | |
public: | |
int color; |
This file contains hidden or 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 <vector> | |
#include <string> | |
#include <iostream> | |
#include <stdio.h> | |
using namespace std; | |
struct HashNode; | |
int Insert(vector<HashNode> *&table, HashNode elem); | |
typedef unsigned int int_t; | |
struct HashNode { |
This file contains hidden or 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 <string> | |
#include <iostream> | |
using namespace std; | |
int main(){ | |
long long last[10],next[10],i,n,h,ans; | |
cin>>n; |
This file contains hidden or 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 <vector> | |
#include <iostream> | |
using namespace std; | |
class Matrix{ | |
public: | |
Matrix(int n) { | |
matrix.resize(n*(n+1)/2, 0); | |
size = n; | |
} |
This file contains hidden or 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 <algorithm> | |
using std::cout; | |
using std::cin; | |
class Group{ | |
public: | |
Group(){ |
This file contains hidden or 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 <list> | |
#include <map> | |
#include <string> | |
using namespace std; | |
class Node { | |
public: | |
char Symbol; | |
int Frequency; | |
Node *Right, *Left; |