This file contains hidden or 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
# -*- coding: utf-8 -*- | |
def radixSort(a, n, maxLen): | |
''' | |
Цифровая сортировка: | |
a - array | |
n - кол-во возможных значения одного разряда | |
maxLen - максимальное количество разрядов | |
Циклически обходим каждый разряд, |
This file contains hidden or 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 <stdio.h> | |
#include <string.h> | |
struct CharAndFreq | |
{ | |
char ch; | |
unsigned freq; | |
}; |
This file contains hidden or 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 <fstream>//qsort by marsharp | |
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
int a[100005]; | |
void qsort(int l,int r) | |
{ | |
int i,j,tmp=a[(r+l)/2]; | |
if(r==l)return; | |
i=l; |
This file contains hidden or 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
def radixSort(a, n, maxLen): | |
''' | |
Цифровая сортировка: | |
a - array | |
n - кол-во возможных значения одного разряда | |
maxLen - максимальное количество разрядов | |
Циклически обходим каждый разряд, | |
для каждого разряда создаем корзины | |
В зависимости от разряда добавляем число в один из 10 массивов. | |
''' |
This file contains hidden or 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
# Русский перевод для https://github.com/plataformatec/devise/tree/v1.4.7 | |
# Другие переводы на http://github.com/plataformatec/devise/wiki/I18n | |
ru: | |
errors: | |
messages: | |
expired: "устарела. Пожалуйста, запросите новую" | |
not_found: "не найдена" | |
already_confirmed: "уже подтверждена. Пожалуйста, попробуйте войти в систему" | |
not_locked: "не заблокирована" |
This file contains hidden or 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 <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
// #include <stdbool.h> // bool | |
#define BLOCKSIZE 50 | |
// Преобразование Барроуза-Уиллера | |
void swap(char *f, char *l, int memory) | |
{ |
This file contains hidden or 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 <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
// #include <stdbool.h> // bool | |
#define BLOCKSIZE 5000 | |
#define MAX_TREE_HT 100 | |
// Преобразование Барроуза-Уиллера | |
// int f = 53; // колво символов в алфавите mtf | |
struct CharAndFreq |
This file contains hidden or 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
// c = t%(m+1) | |
// T - итоговая сумма, M - макс допустимое значение контрольной суммы | |
#include <stdio.h> | |
#define MAX 256 | |
#define POLYNOMIAL 0x81 | |
FILE *file; | |
unsigned char crc8(unsigned int len) |
This file contains hidden or 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 <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int heap[1000000]; | |
int size = 0; | |
int StrCompare(char *Str1,char *Str2) | |
{ |
This file contains hidden or 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 <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
struct node | |
{ | |
int data; | |
struct node* next; | |
}; |
OlderNewer