This file contains 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
let rnd = System.Random() | |
[<AbstractClass>] | |
type Exp() = | |
abstract Value:int with get | |
abstract ExpString:string | |
default this.Value = 0 | |
default this.ExpString = this.Value.ToString() | |
type ValueExp (value:int) = |
This file contains 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
<html> | |
<head> | |
<title> Expression Generator </title> | |
<script> | |
function expr(value, left, op, right, hasParentheses){ | |
this.value = value; | |
this.left = left; | |
this.right = right; | |
this.op = op; |
This file contains 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
let rec gf a k = | |
if k = 1 then a | |
else | |
if a % k = 0 then gf k (k / 2) | |
else gf a (k - 1) | |
let greatestFactor a = gf a (a/2) | |
let v = greatestFactor 75 | |
printfn "%d" v |
This file contains 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
let rec directmatch (s:string) (d:string) (i:int) (j:int) (prev:int) = | |
if i = s.Length then true | |
else | |
if s.[i] = '*' then directmatch s d (i + 1) j i | |
else | |
if j < d.Length then | |
if s.[i] = d.[j] then directmatch s d (i + 1) (j + 1) prev | |
else directmatch s d (prev + 1) (j - i + prev + 2) prev | |
else false |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace EightQueen | |
{ | |
class Program | |
{ |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace ThreadPool | |
{ | |
class Program |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
class Program | |
{ | |
static long Solve(int n, int m, int[] c) | |
{ | |
long[,] C = new long[n + 1, m]; | |
for (var i = 0; i <= n; i++) |
This file contains 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
public class CharMapper | |
{ | |
private static char[][] _dictionary = new char[14][]{ new char[] {'a', 'á', 'à', 'ả', 'ã', 'ạ', 'â', 'ấ', 'ầ', 'ẩ', 'ẫ', 'ậ', 'ă', 'ắ', 'ằ', 'ả', 'ẵ', 'ặ'}, | |
new char[] {'d', 'đ'}, | |
new char[] {'e', 'é', 'è', 'ẻ', 'ẽ', 'ẹ', 'ê', 'ế', 'ề', 'ể', 'ễ', 'ệ'}, | |
new char[] {'i', 'í', 'ì', 'ỉ', 'ĩ', 'ị'}, | |
new char[] {'o', 'ó', 'ò', 'ỏ', 'õ', 'ọ', 'ô', 'ố', 'ồ', 'ổ', 'ỗ', 'ộ', 'ơ', 'ớ', 'ờ', 'ở', 'ỡ', 'ợ'}, | |
new char[] {'u', 'ú', 'ù', 'ủ', 'ũ', 'ụ', 'ư', 'ứ', 'ừ', 'ử', 'ữ', 'ự'}, | |
new char[] {'y', 'ý', 'ỳ', 'ỷ', 'ỹ', 'ỵ'}, | |
new char[] {'A', 'Á', 'À', 'Ả', 'Ã', 'Ạ', 'Â', 'Ấ', 'Ầ', 'Ẩ', 'Ẫ' |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
namespace Tuenti5 |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Tuenti7 | |
{ | |
class Program |
OlderNewer