ISEbd-11.Evtishina.E.V.01 #1
@ -31,7 +31,7 @@ public class DrawningTank
|
||||
/// <summary>
|
||||
/// Ширина прорисовки автомобиля
|
||||
/// </summary>
|
||||
private readonly int _drawningTankWidth = 145;
|
||||
private readonly int _drawningTankWidth = 218;
|
||||
/// <summary>
|
||||
/// Высота прорисовки автомобиля
|
||||
/// </summary>
|
||||
@ -49,7 +49,7 @@ public class DrawningTank
|
||||
public void Init(int speed, double weight, Color bodyColor, Color additionalColor, bool pushka, bool pulemet)
|
||||
{
|
||||
EntityTank = new EntityTank();
|
||||
EntityTank.Init(speed, weight, bodyColor, additionalColor,pushka, pulemet);
|
||||
EntityTank.Init(speed, weight, bodyColor, additionalColor, pushka, pulemet);
|
||||
_pictureWidth = null;
|
||||
_pictureHeight = null;
|
||||
_startPosX = null;
|
||||
@ -161,14 +161,32 @@ public class DrawningTank
|
||||
Brush additionalBrush = new SolidBrush(EntityTank.AdditionalColor);
|
||||
Brush bodyBrush = new SolidBrush(EntityTank.BodyColor);
|
||||
|
||||
//linii v gusenice
|
||||
Point p4 = new Point(_startPosX.Value + 100, _startPosY.Value + 10);
|
||||
Point p5 = new Point(_startPosX.Value + 100, _startPosY.Value + 10);
|
||||
Point p6 = new Point(_startPosX.Value + 100, _startPosY.Value + 10);
|
||||
Point p7 = new Point(_startPosX.Value + 100, _startPosY.Value + 10);
|
||||
Point[] p_pulemet = { p4, p5, p6, p7 };
|
||||
g.FillPolygon(additionalBrush, p_pulemet);
|
||||
|
||||
g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 45, 150, 60);
|
||||
g.DrawEllipse(pen, _startPosX.Value + 5, _startPosY.Value + 60, 33, 33);
|
||||
g.DrawEllipse(pen, _startPosX.Value + 110, _startPosY.Value + 60, 33, 33);
|
||||
|
||||
//otrisovka gusenici
|
||||
g.DrawEllipse(pen, _startPosX.Value + 11, _startPosY.Value + 66, 20, 20);
|
||||
g.DrawEllipse(pen, _startPosX.Value + 117, _startPosY.Value + 66, 20, 20);
|
||||
|
||||
g.DrawEllipse(pen, _startPosX.Value + 35, _startPosY.Value + 80, 16, 16);
|
||||
g.DrawEllipse(pen, _startPosX.Value + 55, _startPosY.Value + 83, 16, 16);
|
||||
g.DrawEllipse(pen, _startPosX.Value + 75, _startPosY.Value + 83, 16, 16);
|
||||
g.DrawEllipse(pen, _startPosX.Value + 95, _startPosY.Value + 80, 16, 16);
|
||||
|
||||
g.FillEllipse(bodyBrush, _startPosX.Value + 38, _startPosY.Value + 83, 10, 10);
|
||||
g.FillEllipse(bodyBrush, _startPosX.Value + 58, _startPosY.Value + 86, 10, 10);
|
||||
g.FillEllipse(bodyBrush, _startPosX.Value + 78, _startPosY.Value + 86, 10, 10);
|
||||
g.FillEllipse(bodyBrush, _startPosX.Value + 98, _startPosY.Value + 83, 10, 10);
|
||||
|
||||
g.FillEllipse(bodyBrush, _startPosX.Value + 45, _startPosY.Value + 55, 15, 15);
|
||||
g.FillEllipse(bodyBrush, _startPosX.Value + 65, _startPosY.Value + 55, 15, 15);
|
||||
g.FillEllipse(bodyBrush, _startPosX.Value + 85, _startPosY.Value + 55, 15, 15);
|
||||
@ -176,17 +194,17 @@ public class DrawningTank
|
||||
g.FillRectangle(bodyBrush, _startPosX.Value + 30, _startPosY.Value + 10, 100, 30);
|
||||
g.FillRectangle(bodyBrush, _startPosX.Value + 5, _startPosY.Value + 40, 140, 25);
|
||||
|
||||
if(EntityTank.Pushka)
|
||||
g.FillRectangle(additionalBrush, _startPosX.Value + 120, _startPosY.Value + 20, 100, 15);
|
||||
//if(EntityTank.Pushka)
|
||||
// g.FillRectangle(additionalBrush, _startPosX.Value + 120, _startPosY.Value + 20, 100, 15);
|
||||
|
||||
if (EntityTank.Pulemet)
|
||||
{
|
||||
Point p = new Point(_startPosX.Value + 75, _startPosY.Value + 10);
|
||||
Point p1 = new Point(_startPosX.Value + 80, _startPosY.Value + 1);
|
||||
Point p2 = new Point(_startPosX.Value + 87, _startPosY.Value + 2);
|
||||
Point p3 = new Point(_startPosX.Value + 80, _startPosY.Value + 10);
|
||||
Point[] p_pulemet = { p, p1, p2, p3 };
|
||||
g.FillPolygon(additionalBrush, p_pulemet);
|
||||
}
|
||||
//if (EntityTank.Pulemet)
|
||||
//{
|
||||
// Point p = new Point(_startPosX.Value + 75, _startPosY.Value + 10);
|
||||
// Point p1 = new Point(_startPosX.Value + 80, _startPosY.Value + 1);
|
||||
// Point p2 = new Point(_startPosX.Value + 87, _startPosY.Value + 2);
|
||||
// Point p3 = new Point(_startPosX.Value + 80, _startPosY.Value + 10);
|
||||
// Point[] p_pulemet = { p, p1, p2, p3 };
|
||||
// g.FillPolygon(additionalBrush, p_pulemet);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ public class EntityTank
|
||||
/// Признак (опция) наличия антикрыла
|
||||
/// </summary>
|
||||
public bool Pulemet { get; private set; }
|
||||
public bool Gusenica { get; private set; }
|
||||
/// <summary>
|
||||
/// Шаг перемещения автомобиля
|
||||
/// </summary>
|
||||
|
@ -48,8 +48,7 @@ namespace Tank
|
||||
Random random = new();
|
||||
_drawningTank = new DrawningTank();
|
||||
|
||||
_drawningTank.Init(random.Next(100, 300), random.Next(1000,
|
||||
3000),
|
||||
_drawningTank.Init(random.Next(100, 300), random.Next(1000, 3000),
|
||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256),
|
||||
random.Next(0, 256)),
|
||||
Color.FromArgb(random.Next(0, 256), random.Next(0, 256),
|
||||
|
135
labalaba2/lab2/SourceZhadny.cpp
Normal file
135
labalaba2/lab2/SourceZhadny.cpp
Normal file
@ -0,0 +1,135 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
class Item {
|
||||
private:
|
||||
std::string name;
|
||||
int weight;
|
||||
int price;
|
||||
public:
|
||||
|
||||
int GetItemWeight() {
|
||||
return weight;
|
||||
}
|
||||
int GetItemPrice() {
|
||||
return price;
|
||||
}
|
||||
double GetPriceOfWeight() {
|
||||
return price / (double)weight;
|
||||
}
|
||||
void PrintParametres() {
|
||||
std::cout << "\tName item: " << name << "\n\t\tWeight: " << weight << "\n\t\tPrice:" << price << std::endl;
|
||||
}
|
||||
void SetParametresOfItem() {
|
||||
std::cout << "Enter name of item: ";
|
||||
std::cin >> name;
|
||||
std::cout << std::endl;
|
||||
std::cout << "Enter weight of item: ";
|
||||
std::cin >> weight;
|
||||
std::cout << std::endl;
|
||||
std::cout << "Enter price of item: ";
|
||||
std::cin >> price;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
class ItemsHeap {
|
||||
private:
|
||||
bool sorted = false;
|
||||
std::vector <Item> itemsHeap;
|
||||
void m_swap(int i_1, int i_2) {
|
||||
Item tmp = itemsHeap[i_1];
|
||||
itemsHeap[i_1] = itemsHeap[i_2];
|
||||
itemsHeap[i_2] = tmp;
|
||||
}
|
||||
void sort_items() {
|
||||
int i_mx = 0;
|
||||
for (int i = 0; i < itemsHeap.size(); ++i) {
|
||||
i_mx = i;
|
||||
for (int j = i + 1; j < itemsHeap.size(); ++j) {
|
||||
if (itemsHeap[j].GetPriceOfWeight() > itemsHeap[i_mx].GetPriceOfWeight()) {
|
||||
i_mx = j;
|
||||
}
|
||||
}
|
||||
if (i != i_mx)
|
||||
m_swap(i, i_mx);
|
||||
}
|
||||
}
|
||||
public:
|
||||
int GetSizeHeap() {
|
||||
return itemsHeap.size();
|
||||
}
|
||||
void AddItemInHeap() {
|
||||
Item newItem;
|
||||
newItem.SetParametresOfItem();
|
||||
itemsHeap.push_back(newItem);
|
||||
}
|
||||
Item getItem() {
|
||||
if (!sorted) {
|
||||
sort_items();
|
||||
sorted = true;
|
||||
}
|
||||
Item temp = itemsHeap[0];
|
||||
itemsHeap.erase(itemsHeap.begin());
|
||||
return temp;
|
||||
}
|
||||
};
|
||||
|
||||
class Knapsack {
|
||||
private:
|
||||
int max_weight;
|
||||
int weight = 0;
|
||||
int price = 0;
|
||||
ItemsHeap heap;
|
||||
std::vector <Item> items;
|
||||
void SumOfItems(Item temp) {
|
||||
price += temp.GetItemPrice();
|
||||
}
|
||||
void WeightOfItems(Item temp) {
|
||||
weight += temp.GetItemWeight();
|
||||
}
|
||||
public:
|
||||
int GetSizeOfHeapOnFloor() {
|
||||
return heap.GetSizeHeap();
|
||||
}
|
||||
void SetMaxWeight() {
|
||||
std::cout << "Enter max weight: ";
|
||||
std::cin >> max_weight;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
void PrintItems() {
|
||||
std::cout << "Items:\n";
|
||||
for (int i = 0; i < items.size(); ++i) {
|
||||
items[i].PrintParametres();
|
||||
}
|
||||
}
|
||||
void PrintParametresKnapsack() {
|
||||
std::cout << "Backpack parametres:\n" << "\tPrice: " << price << " " << "\n\tWeight: " << weight << " " << "\n\tMax weight: " << max_weight << std::endl;
|
||||
PrintItems();
|
||||
}
|
||||
void AddItemOnFloor() {
|
||||
heap.AddItemInHeap();
|
||||
}
|
||||
void AddItemInKnapsack() {
|
||||
while (heap.GetSizeHeap() > 0) {
|
||||
Item temp = heap.getItem();
|
||||
if (temp.GetItemWeight() + weight <= max_weight)
|
||||
{
|
||||
items.push_back(temp);
|
||||
SumOfItems(temp);
|
||||
WeightOfItems(temp);
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
std::cout << "Complete task" << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
void main() {
|
||||
Knapsack backpack;
|
||||
backpack.SetMaxWeight();
|
||||
backpack.AddItemOnFloor();
|
||||
backpack.AddItemInKnapsack();
|
||||
backpack.PrintParametresKnapsack();
|
||||
}
|
135
labalaba2/lab2/lab2.vcxproj
Normal file
135
labalaba2/lab2/lab2.vcxproj
Normal file
@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{94371f76-b2cc-4212-8f44-31c220e94e22}</ProjectGuid>
|
||||
<RootNamespace>lab2</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SourceZhadny.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
22
labalaba2/lab2/lab2.vcxproj.filters
Normal file
22
labalaba2/lab2/lab2.vcxproj.filters
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Исходные файлы">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы заголовков">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы ресурсов">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SourceZhadny.cpp">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
63
labalaba2/lab2z3/Zadanie3.cpp
Normal file
63
labalaba2/lab2z3/Zadanie3.cpp
Normal file
@ -0,0 +1,63 @@
|
||||
#include <iostream>
|
||||
|
||||
|
||||
void m_swap(int* arr, int i_1, int i_2) {
|
||||
int tmp = arr[i_1];
|
||||
arr[i_1] = arr[i_2];
|
||||
arr[i_2] = tmp;
|
||||
}
|
||||
int fib(int n) { //O(2**n)
|
||||
if (n < 2)
|
||||
return 1;
|
||||
return fib(n - 1) + fib(n - 2);
|
||||
}
|
||||
|
||||
void sort_choice(int arr[], int size) { //n*n
|
||||
int i_mn = 0;
|
||||
for (int i = 0; i < size; ++i) {
|
||||
i_mn = i;
|
||||
for (int j = i + 1; j < size; ++j) {
|
||||
if (arr[j] < arr[i_mn]) {
|
||||
i_mn = j;
|
||||
}
|
||||
}
|
||||
if (i != i_mn)
|
||||
m_swap(arr, i, i_mn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void quickSort(int* arr, int left, int right) //n logN
|
||||
{
|
||||
int piv;
|
||||
int index;
|
||||
int _left = left;
|
||||
int _right = right;
|
||||
piv = arr[left];
|
||||
while (left < right)
|
||||
{
|
||||
while ((arr[right] > piv) && (left < right))
|
||||
right--;
|
||||
if (left != right)
|
||||
{
|
||||
arr[left] = arr[right];
|
||||
left++;
|
||||
}
|
||||
while ((arr[left] < piv) && (left < right))
|
||||
left++;
|
||||
if (left != right)
|
||||
{
|
||||
arr[right] = arr[left];
|
||||
right--;
|
||||
}
|
||||
}
|
||||
arr[left] = piv;
|
||||
index = left;
|
||||
left = _left;
|
||||
right = _right;
|
||||
if (left < index)
|
||||
quickSort(arr, left, index - 1);
|
||||
if (right > index)
|
||||
quickSort(arr, index + 1, right);
|
||||
}
|
||||
|
135
labalaba2/lab2z3/lab2z3.vcxproj
Normal file
135
labalaba2/lab2z3/lab2z3.vcxproj
Normal file
@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{5e968207-3ace-4f80-968b-65cd0841b6de}</ProjectGuid>
|
||||
<RootNamespace>lab2z3</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Zadanie3.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
22
labalaba2/lab2z3/lab2z3.vcxproj.filters
Normal file
22
labalaba2/lab2z3/lab2z3.vcxproj.filters
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Исходные файлы">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы заголовков">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы ресурсов">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Zadanie3.cpp">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
51
labalaba2/labalaba2.sln
Normal file
51
labalaba2/labalaba2.sln
Normal file
@ -0,0 +1,51 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34221.43
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "labalaba2", "labalaba2\labalaba2.vcxproj", "{78A2C6D7-BAB1-4CE3-B6B6-B52B3BDCBE5E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lab2", "lab2\lab2.vcxproj", "{94371F76-B2CC-4212-8F44-31C220E94E22}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lab2z3", "lab2z3\lab2z3.vcxproj", "{5E968207-3ACE-4F80-968B-65CD0841B6DE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{78A2C6D7-BAB1-4CE3-B6B6-B52B3BDCBE5E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{78A2C6D7-BAB1-4CE3-B6B6-B52B3BDCBE5E}.Debug|x64.Build.0 = Debug|x64
|
||||
{78A2C6D7-BAB1-4CE3-B6B6-B52B3BDCBE5E}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{78A2C6D7-BAB1-4CE3-B6B6-B52B3BDCBE5E}.Debug|x86.Build.0 = Debug|Win32
|
||||
{78A2C6D7-BAB1-4CE3-B6B6-B52B3BDCBE5E}.Release|x64.ActiveCfg = Release|x64
|
||||
{78A2C6D7-BAB1-4CE3-B6B6-B52B3BDCBE5E}.Release|x64.Build.0 = Release|x64
|
||||
{78A2C6D7-BAB1-4CE3-B6B6-B52B3BDCBE5E}.Release|x86.ActiveCfg = Release|Win32
|
||||
{78A2C6D7-BAB1-4CE3-B6B6-B52B3BDCBE5E}.Release|x86.Build.0 = Release|Win32
|
||||
{94371F76-B2CC-4212-8F44-31C220E94E22}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{94371F76-B2CC-4212-8F44-31C220E94E22}.Debug|x64.Build.0 = Debug|x64
|
||||
{94371F76-B2CC-4212-8F44-31C220E94E22}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{94371F76-B2CC-4212-8F44-31C220E94E22}.Debug|x86.Build.0 = Debug|Win32
|
||||
{94371F76-B2CC-4212-8F44-31C220E94E22}.Release|x64.ActiveCfg = Release|x64
|
||||
{94371F76-B2CC-4212-8F44-31C220E94E22}.Release|x64.Build.0 = Release|x64
|
||||
{94371F76-B2CC-4212-8F44-31C220E94E22}.Release|x86.ActiveCfg = Release|Win32
|
||||
{94371F76-B2CC-4212-8F44-31C220E94E22}.Release|x86.Build.0 = Release|Win32
|
||||
{5E968207-3ACE-4F80-968B-65CD0841B6DE}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5E968207-3ACE-4F80-968B-65CD0841B6DE}.Debug|x64.Build.0 = Debug|x64
|
||||
{5E968207-3ACE-4F80-968B-65CD0841B6DE}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{5E968207-3ACE-4F80-968B-65CD0841B6DE}.Debug|x86.Build.0 = Debug|Win32
|
||||
{5E968207-3ACE-4F80-968B-65CD0841B6DE}.Release|x64.ActiveCfg = Release|x64
|
||||
{5E968207-3ACE-4F80-968B-65CD0841B6DE}.Release|x64.Build.0 = Release|x64
|
||||
{5E968207-3ACE-4F80-968B-65CD0841B6DE}.Release|x86.ActiveCfg = Release|Win32
|
||||
{5E968207-3ACE-4F80-968B-65CD0841B6DE}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {2B4A490B-BC2E-4EA7-B0EA-55C5328D08A6}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
154
labalaba2/labalaba2/SourceDinam.cpp
Normal file
154
labalaba2/labalaba2/SourceDinam.cpp
Normal file
@ -0,0 +1,154 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
class Item {
|
||||
private:
|
||||
std::string name;
|
||||
int weight;
|
||||
int price;
|
||||
public:
|
||||
int GetItemWeight() {
|
||||
return weight;
|
||||
}
|
||||
int GetItemPrice() {
|
||||
return price;
|
||||
}
|
||||
double GetPriceOfWeight() {
|
||||
return price / (double)weight;
|
||||
}
|
||||
void PrintParametres() {
|
||||
std::cout << "\tName item: " << name << "\n\tWeight: " << weight << "\n\tPrice:" << price << std::endl;
|
||||
}
|
||||
void SetParametresOfItem() {
|
||||
std::cout << "Enter name of item: ";
|
||||
std::cin >> name;
|
||||
std::cout << std::endl;
|
||||
std::cout << "Enter weight of item: ";
|
||||
std::cin >> weight;
|
||||
std::cout << std::endl;
|
||||
std::cout << "Enter price of item: ";
|
||||
std::cin >> price;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
};
|
||||
|
||||
class ItemsHeap {
|
||||
private:
|
||||
std::vector <Item> itemsHeap;
|
||||
public:
|
||||
int GetSizeHeap() {
|
||||
return itemsHeap.size();
|
||||
}
|
||||
void AddItemInHeap() {
|
||||
Item newItem;
|
||||
newItem.SetParametresOfItem();
|
||||
itemsHeap.push_back(newItem);
|
||||
}
|
||||
Item getItem(int i) {
|
||||
return itemsHeap[i];
|
||||
}
|
||||
};
|
||||
class Knapsack {
|
||||
private:
|
||||
int max_weight;
|
||||
int weight = 0;
|
||||
int price = 0;
|
||||
ItemsHeap heap;
|
||||
std::vector <Item> items;
|
||||
|
||||
void SumOfItems(Item temp) {
|
||||
price += temp.GetItemPrice();
|
||||
}
|
||||
void WeightOfItems(Item temp) {
|
||||
weight += temp.GetItemWeight();
|
||||
}
|
||||
void PushItem(Item temp) {
|
||||
items.push_back(temp);
|
||||
SumOfItems(temp);
|
||||
WeightOfItems(temp);
|
||||
}
|
||||
void PrintItems() {
|
||||
std::cout << "Items:\n";
|
||||
for (int i = 0; i < items.size(); ++i) {
|
||||
items[i].PrintParametres();
|
||||
}
|
||||
}
|
||||
public:
|
||||
int GetPiceOfKnapsack() {
|
||||
return price;
|
||||
}
|
||||
int GetSizeOfHeapOnFloor() {
|
||||
return heap.GetSizeHeap();
|
||||
}
|
||||
void SetMaxWeight() {
|
||||
std::cout << "Enter max weight: ";
|
||||
std::cin >> max_weight;
|
||||
std::cout << std::endl;
|
||||
}
|
||||
void PrintParametresKnapsack() {
|
||||
std::cout << "Backpack parametres:\n" << "\tPrice: " << price << " " << "\n\tWeight: " << weight << " " << "\n\tMax weight: " << max_weight << std::endl;
|
||||
PrintItems();
|
||||
}
|
||||
void AddItemOnFloor() {
|
||||
heap.AddItemInHeap();
|
||||
}
|
||||
void AddItemInKnapsack() {
|
||||
if (heap.GetSizeHeap() > 1) {
|
||||
Knapsack** kp = new Knapsack * [heap.GetSizeHeap() + 1];
|
||||
Knapsack temp, temp2;
|
||||
int max_price = 0, i_mx = 0, j_mx = 0;
|
||||
for (int i = 0; i < max_weight; ++i) {
|
||||
kp[i] = new Knapsack[max_weight + 1];
|
||||
}
|
||||
for (int i = 0; i < heap.GetSizeHeap() + 1; ++i) {
|
||||
for (int j = 0; j < max_weight + 1; ++j) {
|
||||
if (i == 0 || j == 0)
|
||||
{
|
||||
kp[i][j] = temp;
|
||||
}
|
||||
else if (i == 1) {
|
||||
if (heap.getItem(0).GetItemWeight() <= j)
|
||||
kp[1][j].PushItem(heap.getItem(0));
|
||||
else
|
||||
kp[1][j] = temp;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (heap.getItem(i - 1).GetItemWeight() > j)
|
||||
kp[i][j] = kp[i - 1][j];
|
||||
else
|
||||
{
|
||||
int newPrice = heap.getItem(i - 1).GetItemPrice() + kp[i - 1][j - heap.getItem(i - 1).GetItemWeight()].GetPiceOfKnapsack();
|
||||
if (kp[i - 1][j].GetPiceOfKnapsack() > newPrice)
|
||||
kp[i][j] = kp[i - 1][j];
|
||||
else
|
||||
{
|
||||
kp[i][j] = kp[i - 1][j - heap.getItem(i - 1).GetItemWeight()];
|
||||
kp[i][j].PushItem(heap.getItem(i - 1));
|
||||
temp2 = kp[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < temp2.items.size(); ++i) {
|
||||
PushItem(temp2.items[i]);
|
||||
}
|
||||
std::cout << "Complete task" << std::endl;
|
||||
}
|
||||
else {
|
||||
PushItem(heap.getItem(0));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
void main() {
|
||||
Knapsack backpack;
|
||||
backpack.SetMaxWeight();
|
||||
backpack.AddItemOnFloor();
|
||||
backpack.AddItemOnFloor();
|
||||
backpack.AddItemInKnapsack();
|
||||
backpack.PrintParametresKnapsack();
|
||||
}
|
135
labalaba2/labalaba2/labalaba2.vcxproj
Normal file
135
labalaba2/labalaba2/labalaba2.vcxproj
Normal file
@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{78a2c6d7-bab1-4ce3-b6b6-b52b3bdcbe5e}</ProjectGuid>
|
||||
<RootNamespace>labalaba2</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SourceDinam.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
22
labalaba2/labalaba2/labalaba2.vcxproj.filters
Normal file
22
labalaba2/labalaba2/labalaba2.vcxproj.filters
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Исходные файлы">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы заголовков">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Файлы ресурсов">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="SourceDinam.cpp">
|
||||
<Filter>Исходные файлы</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user