Skip to content

Instantly share code, notes, and snippets.

View kevroletin's full-sized avatar
🌴
Riding a scooter

Vasiliy Kevroletin kevroletin

🌴
Riding a scooter
View GitHub Profile
#include <stdio.h>
#include <vector>
#include <algorithm>
const char L[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
void pr_hex(int i, int k = 0)
{
if (k == 16) return;
pr_hex(i / 16, k + 1);
#include <iostream>
#include <time.h>
#include <math.h>
#include <limits>
int main ()
{
int MAX_N = 1000000;
int a[MAX_N];
int b;
#include <iostream>
#include <stdio.h>
#include <math.h>
//---------- MEGA PROFILER ----------
unsigned long long __time1, __time2, __dt, __min_dt;
#define TEST_HEAD(REPEAT_TIMES)\
__min_dt = 0xffffffff;\
#include <iostream>
#include <stdio.h>
#include <math.h>
//---------- MEGA PROFILER ----------
unsigned long long __time1, __time2, __dt, __min_dt, __time_total;
#define TEST_HEAD_EX(REPEAT_TIMES)\
__min_dt = 0xffffffff;\
#include <iostream>
#include <stdio.h>
#include <math.h>
#include <fstream>
#include <math.h>
using namespace std;
#include "megaprofiler.h"
const int max_n = 10000000;
const double dh = 1;
@kevroletin
kevroletin / din.cpp
Created February 24, 2011 15:36
Multiplication Puzzle
#include<fstream>
#include<math.h>
using namespace std;
const int MAX_SIZE = 100;
const int MAX_INT = 9999999;
int a[MAX_SIZE];
int d[MAX_SIZE][MAX_SIZE]; // Вот здесь хранятся частичные решения. Размерности означают следующее:
@kevroletin
kevroletin / gist:1228737
Created September 20, 2011 09:32
README

SMALLWORLDS - ALPHA EDITION Version 0.001 Readme File September 15, 2011

About This Document:

This README file includes information that pertains to general

@kevroletin
kevroletin / gist:5069653
Last active December 14, 2015 10:09
Test where Delphi allocates local variables of anonymous methods
program inner_var;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
type
@kevroletin
kevroletin / gist:5070644
Last active December 14, 2015 10:18
Explore how many memory Delphi allocates for FrameObjects.
program frameobj_alloc;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
const
program capture_by_value;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils;
type