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
//set namespace | |
using namespace std; | |
//prefix | |
#pragma once | |
#pragma warning (disable : 4996) | |
//headers | |
#include <iostream> | |
#include <sstream> |
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
template <typename type, typename std_type = std::allocator<type>>std::list<type, std_type> operator+(std::list<type, std_type> * operand, std::list<type> * operanded) | |
{ | |
std::list<type> * list = new std::list<type>; | |
list.assign(operand.begin(), operand.end()); | |
for_each(operanded.begin(), operanded.end(), [&list](type element)->void{ list.push_back(element); }); | |
return list; | |
} |
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 <hash_map> | |
#include <algorithm> | |
#include <utility> | |
#include <functional> | |
using namespace std; | |
template <typename type> class LIS{ |
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 <hash_map> | |
#include <algorithm> | |
#include <utility> | |
#include <queue> | |
#include <functional> | |
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 <vector> | |
//normal set _ std::mayb3:: | |
using namespace std; | |
int main() | |
{ | |
int n, m; | |
cin >> n >> m; | |
vector<int> v; | |
for (int i = 0; i < n; i++) |
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 <algorithm> | |
#include <utility> | |
#include <string> | |
#include <queue> | |
//normal set _ std::mayb3:: | |
using namespace std; | |
vector<int> ma[65537]; | |
queue<int> qu; |
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
template <typename object_type> void event_click(std::unordered_map <std::string, object_type> map, int x, int y, int wParam) | |
{ | |
for_each(map.begin(), map.end(), [&, x, y, wParam](std::pair<std::string, object_type> arg) { | |
if ((arg.second)->x() < x && (arg.second)->x2() > x && (arg.second)->y() < y && (arg.second)->y2() > y) | |
{ | |
arg.second->event_click(x - arg.second->x(), y - arg.second->y(), wParam); | |
} | |
}); | |
} | |
template <typename type> void DrawCall(std::unordered_map<std::string, type> map, std::function<void(std::pair <std::string, type>)> procedure) |
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
std::vector < _value_type > list(this->vertex_count + 1, MAX_COUNT); | |
std::vector < bool > chk(this->vertex_count + 1, false); | |
list.at(start) = 0; | |
while (!chk.at(dest)) | |
{ | |
std::priority_queue < std::pair <_count_type, _value_type>, std::vector < std::pair <_value_type, _count_type> >, | |
std::greater < std::pair < _value_type, _count_type > > > pq; |
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 <iterator> | |
#include <algorithm> | |
#include <functional> | |
#define max std::max | |
#define min std::min |
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 <queue> | |
#include <algorithm> | |
#include <utility> | |
#include <functional> | |
#include <math.h> | |
#include <vector> | |
#define POINT std::pair<size_t, size_t> |