Skip to content

Instantly share code, notes, and snippets.

View ernado's full-sized avatar

Aleksandr Razumov ernado

View GitHub Profile
@ernado
ernado / main.py
Created June 29, 2011 11:24
Profiler for GeneticAlgorythm
# -*- coding: utf-8 -*-
import cProfile
from random import randint
from copy import deepcopy
from math import floor
import random
class Organism:
#initiate
def __init__(self, alleles, fitness, likelihood):
@ernado
ernado / 1.pas
Created September 18, 2011 08:11
Совершенные числа
var {Разумов 11Г}
m,n,i,j,p,st,k,c:longint;
a:array[1..10] of longint;
f:boolean;
begin
{переберем коэффициенты}
j:=0;
read(m,n);
{16 - такой коэффициент, что последнее найденное совершенное число будет послед
ним, входящим в промежуток}
@ernado
ernado / nya.pas
Created February 5, 2012 09:08
EGE
uses crt;
const MAX = 10; {максимальное количество строк в массиве}
{массив строк}
type
TGroupArray = array[1..MAX] of string[7];
var
groups: TGroupArray;
@ernado
ernado / le nya.pas
Created February 9, 2012 16:31
ololo
while true do
begin
Read(c);
if (c = #13) break;
phone:=phone+c;
end
uses
crt;
var
index,
phone, {двузначный номер подразделения}
people,{количество сотрудников, чьи номера введены}
count: byte; {количество подразделений}
s: string; {строка для ввода}
phones: set of byte; {множество уникальных номеров подразделений}
begin
------------------
System Information
------------------
Time of this report: 2/10/2012, 22:23:51
Machine name: SKYTH
Operating System: Windows 7 Максимальная 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_gdr.110622-1506)
Language: Russian (Regional Setting: Russian)
System Manufacturer: System manufacturer
System Model: System Product Name
BIOS: BIOS Date: 12/08/09 Ver: 08.00.14
@ernado
ernado / Matrixes.pas
Created February 20, 2012 23:18
Pascal unit for matrix manipulations by Ernado
unit Matrixes;
interface
uses Crt; const NMAX = 10; {Матрица занимает максимум [Nmax^2 + 2] байт}
type Matrix = record m:array[1..NMAX,1..NMAX] of shortint; rows,lines:byte; end;
procedure Error(message:string);
procedure Print(c1:Matrix);
function ZeroM(lines,rows:byte):Matrix;
function AddM(c1,c2:Matrix):Matrix;
function RandomM(lines,rows:byte):Matrix;
function SubtractM(c1,c2:Matrix):Matrix;
@ernado
ernado / RU.TXT
Created March 3, 2012 00:41
Antigame 2.17 Russian translation [2.17]
//##############################################################
// Please see the How to translate - http://antigame.de/?page_id=45&mingleforumaction=viewtopic&t=17.0
// - Always take the newest text file to update translation ! - Found in each translation thread, first posting.
// - Please remove the comments // new or // changed.
// - Please leave other comments and empty lines as they are
//##############################################################
// Following texts are used in Ogame pages
// Updated for AntiGame Origin version '2.19.0' and above.
//##############################################################
@ernado
ernado / C42.pas
Created March 16, 2012 08:42
C42.pas
uses crt;
type
r = record
f : string[35];
b : word;
end;
const
Nm = 100;
uses crt;
type TDate = string[10]; {свой тип для даты - dd.mm.yyyy}
const N = 5; {Кол-во элементов в массиве}
var
mas : array[1..N] of TDate;
min : TDate;
i : byte; {итератор}