Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
aaa
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here Console.WriteLine("Hello, world!"); } static int D(int i, int j, int[] x, int[] y) { if (x[i - 1] == y[j - 1]) return 1; return 0; } static int F(int m, int n, int[] x, int[] y) { if (n == 0) { return m; } else if (m == 0 && n > 0) { return n; } Task<int> first = Task.Factory.StartNew(() => F(m - 1, n, x, y)); Task<int> second = Task.Factory.StartNew(() => F(m, n - 1, x, y)); Task<int> third = Task.Factory.StartNew(() => D(m, n, x, y)); Task<int> fourth = Task.Factory.StartNew(() => F(m - 1, n - 1, x, y)); Task.WaitAll(first, second, third, fourth); return Math.Min(Math.Min(1 + first.Result, 1 + second.Result), third.Result + fourth.Result); } } }
run
|
edit
|
history
|
help
-1
Download a UTF-8 text file, and display the contents.
Pascal's triangle
z x xc x
C# practice
services
sintildes
1
//Json Get Field from Array
OBJ Good Start
jdiwnnx cf