Beispiel #1
0
        public void CompileFile(User user, string problemId)
        {
            var pathToSolution         = PathManager.GetPath(FoldersPath.SolutionLocation, user.Username);
            var completePathToSolution = PathManager.GetPath(pathToSolution, $"{problemId}.cpp");
            var outPath = PathManager.GetPath(pathToSolution, "a.exe");

            CmdManager.RunCommand($"g++ {completePathToSolution} -o {outPath} -std=c++11");
        }
Beispiel #2
0
        public void CreateUserOutput(User user, string problemId)
        {
            var completePathToIn = PathManager.GetPath(FoldersPath.IOLocation, $"{problemId}.in");

            var pathToSolution = PathManager.GetPath(FoldersPath.SolutionLocation, user.Username);

            var useroutPath = PathManager.GetPath(pathToSolution, $"userout-{problemId}.txt");

            CmdManager.RunCommand(@$ "{pathToSolution}\a.exe < {completePathToIn} > {useroutPath}");
        }
Beispiel #3
0
        public void CleanAll(User user, string problemId)
        {
            var pathToSolution = PathManager.GetPath(FoldersPath.SolutionLocation, user.Username);
            var useroutPath    = PathManager.GetPath(pathToSolution, $"userout-{problemId}.txt");
            var resPath        = PathManager.GetPath(pathToSolution, $"res-{problemId}.txt");
            var outPath        = PathManager.GetPath(pathToSolution, "a.exe");

            CmdManager.RunCommand($"del {outPath}");
            CmdManager.RunCommand($"del {useroutPath}");
            CmdManager.RunCommand($"del {resPath}");
        }
Beispiel #4
0
        public void CreateResult(User user, string problemId)
        {
            var completePathToOut = PathManager.GetPath(FoldersPath.IOLocation, $"{problemId}.out");

            var pathToSolution = PathManager.GetPath(FoldersPath.SolutionLocation, user.Username);

            var useroutPath = PathManager.GetPath(pathToSolution, $"userout-{problemId}.txt");
            var resPath     = PathManager.GetPath(pathToSolution, $"res-{problemId}.txt");

            CmdManager.RunCommand(@$ "fc {completePathToOut} {useroutPath} > {resPath}");
        }