Skip to content

Instantly share code, notes, and snippets.

View jiunbae's full-sized avatar

Jiun Bae (June) jiunbae

View GitHub Profile
#include<regex>
#include<iostream>
#include<string>
using namespace std;
int main(int argc, char ** argv)
{
int test; cin >> test;
while (test--)
{
string str; cin >> str;
import re
test = input()
for i in range(test):
str = raw_input()
result=re.match("[A-F]?A+F+C+$[A-F]?",str)
if(result == None):
print("Good")
else:
print("Infected!")
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;
template<typename type>
class IndexTree {
private:
std::vector<type> elements;
template<typename type>
class HeapTree {
private:
type max(type a, type b) { return a > b ? a : b; }
type min(type a, type b) { return a > b ? b : a; }
vector<type> m_ele, M_ele;
size_t e_size, t_size;
pair<type,type> qquery(size_t node, size_t begin, size_t end, size_t first, size_t second)
{
if (end < first || begin > second)
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
template<typename type>
class HeapTree {
private:
type max(type a, type b) { return a > b ? a : b; }
type min(type a, type b) { return a > b ? b : a; }
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
template <typename type>
struct Comp {
Comp(type val) : _val(val) {}
bool operator() (const pair<type, vector<type>> & vec) const
{
#include <iostream>
#include <queue>
#include <algorithm>
#include <utility>
#include <functional>
#include <math.h>
#include <vector>
#define POINT std::pair<size_t, size_t>
#include <iostream>
#include <vector>
#include <iterator>
#include <algorithm>
#include <functional>
#define max std::max
#define min std::min
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;
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)