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
//Все пояснения тут http://ru.wikipedia.org/wiki/Метод_Гаусса_—_Жордана | |
#include <iostream> | |
#include <conio.h> | |
#include <stdlib.h> | |
#include <iomanip> | |
#include "math.h" | |
using namespace std; | |
void main() |
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 <iostream> | |
#include <fstream> | |
#include "math.h" | |
#include "windows.h" | |
#include <iomanip> | |
#include <conio.h> | |
#include <stdio.h> | |
using namespace std; |
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<iostream> | |
struct Titem{ | |
int n; | |
Titem *next; | |
}; | |
void add_item(Titem *last){ | |
Titem *add = new Titem; | |
add->n=last->n+1; |
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 <iostream> | |
#include <time.h> | |
int search(int *a, int n, int x) | |
{ | |
size_t first = 0; /* Номер первого элемента в массиве */ | |
size_t last = n; /* Номер элемента в массиве, СЛЕДУЮЩЕГО ЗА последним */ | |
/* Если просматриваемый участок непустой, first<last */ | |
size_t mid = first + (last - first) / 2; | |
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 <limits.h> | |
#include <algorithm> | |
class Tochka{ | |
public: | |
int x, y; | |
Tochka(int x1, int y1){ | |
x = x1; | |
y = y1; | |
} |
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 <iostream> | |
#include <vector> | |
#include <math.h> | |
int digit(long long A, long long shift){ | |
return (int)(A / shift)%(sizeof(long long)*8); | |
} | |
template<class T> | |
void count_sort(T *a, T* vtemp, int n, long long shift, int (*dig)(T,T)){ | |
const int digits = sizeof(T) * 8; | |
std::vector<T> positions(digits); |
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 <stdint.h> | |
#include <algorithm> | |
#include <vector> | |
int size = 0; | |
void Heapify(int* arr, int i) { | |
int left = 2 * i + 1; int right = 2 * i + 2; // Ищем большего сына, если такой есть. | |
int largest = i; | |
if (left < size && arr[left] > arr[i]) |
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 <vector> | |
class Impact; | |
struct Circle | |
{ | |
float x, y, r; | |
}; |
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> | |
using namespace std; | |
class Node { | |
private: | |
int _value; | |
Node *_left; | |
Node *_right; | |
public: |
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> | |
class Tree { | |
protected: | |
class Node { | |
private: | |
int _value; |