feat: stash changes

This commit is contained in:
Lam Haoyin 2022-02-21 12:53:42 +08:00
parent b211c4dc2d
commit d7bb6d819c
No known key found for this signature in database
GPG Key ID: 8C089CB1A2B7544F
3 changed files with 56 additions and 0 deletions

16
csharp/Feb22/Feb22.sln Normal file
View File

@ -0,0 +1,16 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cn-0221", "cn-0221\cn-0221.csproj", "{80105805-C505-4A25-BAE2-1F8AC43D53E7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{80105805-C505-4A25-BAE2-1F8AC43D53E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80105805-C505-4A25-BAE2-1F8AC43D53E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80105805-C505-4A25-BAE2-1F8AC43D53E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{80105805-C505-4A25-BAE2-1F8AC43D53E7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,29 @@
namespace cn_0221;
public class Solution {
public static string PushDominoes(string dominoes) {
var q = new Queue<int>();
var n = dominoes.Length;
for (int i = 0; i < n; ++i) {
if ('.' != dominoes[i]) {
q.Enqueue(i);
q.Enqueue(0);
}
}
var result = new int[n];
var lastModified = new int[n];
while (q.Count > 0) {
var position = q.Dequeue();
var timePoint = q.Dequeue();
}
return "test";
}
public static void Main() {
// empty
}
}

View File

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>cn_0221</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>