123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- // Класс для ввода/вывода графа
- static class GraphIoUtilities
- {
- static private readonly int MAX_AMOUNT = 20;
- static public Dictionary<char, int> GenerateCharToVertexId()
- {
- Dictionary<char, int> result = new Dictionary<char, int>();
- char letter = 'А';
- for (int i = 1; i <= MAX_AMOUNT; i++)
- {
- result[letter] = i;
- letter++;
- }
- return result;
- }
- static public Dictionary<int, char> GenerateVertexIdToChar()
- {
- Dictionary<int, char> result = new Dictionary<int, char>();
- char letter = 'А';
- for (int i = 1; i <= MAX_AMOUNT; i++)
- {
- result[i] = letter;
- letter++;
- }
- return result;
- }
- }
|