Пример #1
0
        public override void CreateAnswers(StreamReader reader)
        {
            FrequencyQueriesAnswer ans = new FrequencyQueriesAnswer()
            {
                answer = new List <int>()
            };

            while (!reader.EndOfStream)
            {
                ans.answer.Add(Convert.ToInt32(reader.ReadLine()));
            }

            Answers.Add(ans);
        }
Пример #2
0
        public override Boolean Equals(Object obj)
        {
            FrequencyQueriesAnswer Answer = obj as FrequencyQueriesAnswer;

            if (Answer?.answer?.Count != this.answer.Count)
            {
                return(false);
            }

            for (int i = 0; i < Answer.answer.Count; i++)
            {
                if (Answer.answer[i] != this.answer[i])
                {
                    return(false);
                }
            }
            return(true);
        }