Все задачи на 5.10.17 13:00
This commit is contained in:
44
uts/uts_2017_sum_cs/C_Redact_rast/C_Redact_rast.csproj
Normal file
44
uts/uts_2017_sum_cs/C_Redact_rast/C_Redact_rast.csproj
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProjectGuid>{1E8CCFCD-A327-4E5F-AE82-147D361DAEAF}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>C_Redact_rast</RootNamespace>
|
||||
<AssemblyName>C_Redact_rast</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ExternalConsole>true</ExternalConsole>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ExternalConsole>true</ExternalConsole>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="distance.in">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Default' ">
|
||||
<StartAction>Project</StartAction>
|
||||
<ExternalConsole>false</ExternalConsole>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
56
uts/uts_2017_sum_cs/C_Redact_rast/Program.cs
Normal file
56
uts/uts_2017_sum_cs/C_Redact_rast/Program.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace A_Yadra
|
||||
{
|
||||
class MainClass
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
FileStream fs = new FileStream("distance.out", FileMode.Create);
|
||||
TextWriter tmp = Console.Out;
|
||||
StreamWriter sw = new StreamWriter(fs);
|
||||
#if DEBUG
|
||||
Console.SetOut(tmp);
|
||||
#else
|
||||
Console.SetOut(sw);
|
||||
#endif
|
||||
FileStream ii = new FileStream("distance.in", FileMode.Open);
|
||||
TextReader tmpi = Console.In;
|
||||
StreamReader swi = new StreamReader(ii);
|
||||
#if false
|
||||
Console.SetIn(tmpi);
|
||||
#else
|
||||
Console.SetIn(swi);
|
||||
#endif
|
||||
//Here comes the plane
|
||||
string s1 = Console.ReadLine();
|
||||
string s2 = Console.ReadLine();
|
||||
int[,] D = new int[s1.Length + 1, s2.Length + 1];
|
||||
D[0, 0] = 0;
|
||||
for (int j = 1; j <= s2.Length; j++)
|
||||
{
|
||||
D[0, j] = D[0, j - 1] + 1;
|
||||
};
|
||||
for (int i = 1; i <= s1.Length; i++)
|
||||
{
|
||||
D[i, 0] = D[i - 1, 0] + 1;
|
||||
for (int j = 1; j <= s2.Length; j++)
|
||||
{
|
||||
if (s1[i-1] != s2[j-1])
|
||||
{
|
||||
D[i, j] = Math.Min(D[i - 1, j] + 1, Math.Min(D[i, j - 1] + 1, D[i - 1, j - 1] + 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
D[i, j] = D[i - 1, j - 1];
|
||||
};
|
||||
};
|
||||
};
|
||||
Console.WriteLine(D[s1.Length, s2.Length]);
|
||||
//ENDS
|
||||
sw.Close();
|
||||
swi.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
26
uts/uts_2017_sum_cs/C_Redact_rast/Properties/AssemblyInfo.cs
Normal file
26
uts/uts_2017_sum_cs/C_Redact_rast/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
|
||||
[assembly: AssemblyTitle("C_Redact_rast")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("${AuthorCopyright}")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
||||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
||||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
// The following attributes are used to specify the signing key for the assembly,
|
||||
// if desired. See the Mono documentation for more information about signing.
|
||||
|
||||
//[assembly: AssemblyDelaySign(false)]
|
||||
//[assembly: AssemblyKeyFile("")]
|
||||
2
uts/uts_2017_sum_cs/C_Redact_rast/distance.in
Normal file
2
uts/uts_2017_sum_cs/C_Redact_rast/distance.in
Normal file
@@ -0,0 +1,2 @@
|
||||
aba
|
||||
baba
|
||||
13
uts/uts_2017_sum_cs/aye/Program.cs
Normal file
13
uts/uts_2017_sum_cs/aye/Program.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace aye
|
||||
{
|
||||
class MainClass
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
#pragma
|
||||
Console.WriteLine("Hello World!");
|
||||
}
|
||||
}
|
||||
}
|
||||
26
uts/uts_2017_sum_cs/aye/Properties/AssemblyInfo.cs
Normal file
26
uts/uts_2017_sum_cs/aye/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
// Information about this assembly is defined by the following attributes.
|
||||
// Change them to the values specific to your project.
|
||||
|
||||
[assembly: AssemblyTitle("aye")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("${AuthorCopyright}")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
||||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
||||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
||||
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
// The following attributes are used to specify the signing key for the assembly,
|
||||
// if desired. See the Mono documentation for more information about signing.
|
||||
|
||||
//[assembly: AssemblyDelaySign(false)]
|
||||
//[assembly: AssemblyKeyFile("")]
|
||||
39
uts/uts_2017_sum_cs/aye/aye.csproj
Normal file
39
uts/uts_2017_sum_cs/aye/aye.csproj
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProjectGuid>{0C75C0DD-FEC4-4DE3-BB42-2BB9C2AE5C86}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>aye</RootNamespace>
|
||||
<AssemblyName>aye</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ExternalConsole>true</ExternalConsole>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ExternalConsole>true</ExternalConsole>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
23
uts/uts_2017_sum_cs/uts_2017_sum.sln
Normal file
23
uts/uts_2017_sum_cs/uts_2017_sum.sln
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C_Redact_rast", "C_Redact_rast\C_Redact_rast.csproj", "{1E8CCFCD-A327-4E5F-AE82-147D361DAEAF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aye", "aye\aye.csproj", "{0C75C0DD-FEC4-4DE3-BB42-2BB9C2AE5C86}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1E8CCFCD-A327-4E5F-AE82-147D361DAEAF}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{1E8CCFCD-A327-4E5F-AE82-147D361DAEAF}.Debug|x86.Build.0 = Debug|x86
|
||||
{1E8CCFCD-A327-4E5F-AE82-147D361DAEAF}.Release|x86.ActiveCfg = Release|x86
|
||||
{1E8CCFCD-A327-4E5F-AE82-147D361DAEAF}.Release|x86.Build.0 = Release|x86
|
||||
{0C75C0DD-FEC4-4DE3-BB42-2BB9C2AE5C86}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{0C75C0DD-FEC4-4DE3-BB42-2BB9C2AE5C86}.Debug|x86.Build.0 = Debug|x86
|
||||
{0C75C0DD-FEC4-4DE3-BB42-2BB9C2AE5C86}.Release|x86.ActiveCfg = Release|x86
|
||||
{0C75C0DD-FEC4-4DE3-BB42-2BB9C2AE5C86}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
14
uts/uts_2017_sum_cs/uts_2017_sum.userprefs
Normal file
14
uts/uts_2017_sum_cs/uts_2017_sum.userprefs
Normal file
@@ -0,0 +1,14 @@
|
||||
<Properties StartupConfiguration="{1E8CCFCD-A327-4E5F-AE82-147D361DAEAF}|Default">
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="aye/Program.cs">
|
||||
<Files>
|
||||
<File FileName="aye/Program.cs" Line="9" Column="9" />
|
||||
</Files>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
|
||||
<MonoDevelop.Ide.ItemProperties.C__Redact__rast PreferredExecutionTarget="MonoDevelop.Default" />
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<BreakpointStore />
|
||||
</MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
|
||||
<MultiItemStartupConfigurations />
|
||||
</Properties>
|
||||
Reference in New Issue
Block a user