コード例 #1
0
        public Algorithm(FileInfo file)
        {
            if (!Regex.IsMatch(file.Name, @"^PB\d{3}(\.\w+)?\.dll$"))
                throw new ArgumentException("Not an available file");

            this.file = new AlgorithmFileInfo(file);
            this.time = TimeSpan.MaxValue;
            this.available = false;
            this.answer = "";
            this.isPrepared = false;
            loadProblem(); 
        }
コード例 #2
0
        public Algorithm(int n = 0, AlgorithmLanguage lang = AlgorithmLanguage.CSharp)
        {
            this.time = TimeSpan.MaxValue;
            this.available = false;
            this.answer = "";
            this.isPrepared = false;

            this.file = new AlgorithmFileInfo(n, lang);

            loadProblem();
        }
コード例 #3
0
 public Algorithm(AlgorithmFileInfo file)
 {
     this.file = file;
     this.time = TimeSpan.MaxValue;
     this.available = false;
     this.answer = "";
     this.isPrepared = false;
     loadProblem();
 }