Example #1
0
 public override void CreateAnswers(StreamReader reader)
 {
     while (!reader.EndOfStream)
     {
         MaximumSubarraySumAnswer ans = new MaximumSubarraySumAnswer()
         {
             result = Convert.ToInt64(reader.ReadLine())
         };
         Answers.Add(ans);
     }
 }
Example #2
0
        public override Boolean Equals(Object obj)
        {
            MaximumSubarraySumAnswer Answer = obj as MaximumSubarraySumAnswer;

            return(Answer.result == this.result);

            /*
             * if (Answer?.arr?.Length != Answers?[SampleID]?.arr?.Length)
             * {
             *  return false;
             * }
             *
             * for (int i = 0; i < Answer.arr.Length; i++)
             * {
             *  if (Answer.arr[i] != Answers[SampleID].arr[i])
             *  {
             *      return false;
             *  }
             * }
             */
        }