철자 단어에 대한 최적의 레터 카드


15

단어 목록이 있고 레터 카드를 사용하여 각 단어의 철자를 원한다고 가정 해 봅시다. 예를 들어, cat 을 철자 하려면 C, A, T라는 세 개의 카드를 사용합니다.

각 카드가 양면 이라고 가정하면 전체 단어 목록을 철자하는 데 사용할 수있는 최소 개수의 카드를 정의하는 프로그램을 제출하십시오.

입력은 단어 목록이며 파일 기반, 하드 코딩, 명령 줄 등 무엇이든 가능합니다. 출력은 카드가 어떻게 라벨링되어 있는지 명확하다면 형식과 순서에 맞는 카드 목록입니다.

대소 문자는 중요하지 않습니다. 골프, 골프 및 골프는 동일합니다.

몇 가지 힌트 :

  • 카드 수는 가장 긴 단어의 길이보다 길 수 없습니다
  • 카드의 양면에 같은 글자를 사용하는 것은 의미가 없습니다.
  • 대소 문자는 중요하지 않지만 특정 대칭 을 활용하려면 소문자를 권장합니다

예를 들어, 다음은 특정 대칭 을 활용합니다 .

입력: 벤, 늪지, 벌레, 덴, 할, 미상, 개, 기한, 파기, 에드, 끝, 덩어리, 신, 네드, 오데, 펜, 포, 퍼그

출력 : b / d, e / g, o / n

입력 : 그리고, 원숭이, 있습니다, 침대, 꽃 봉오리, 가시, 댄, 뎁, 더빙, 귀, 에드, 시대, 낮잠, 팬, 완두콩, 술집, Rae, 달렸다, 문지르 다

출력 : a / b, d / r, e / n

인기 콘테스트가 되려면 코드의 우아함, 런타임 성능 및 영리함 (규칙 굽힘 및 허점 포함)이 중요합니다!

부가 : 일부 사람들은 "허용 된"대칭, 특수 폰트 사용 여부 및 카드를 접을 수 있는지에 대해 물었습니다.

허용되는 대칭은 0, 90, 180 또는 270도 회전 후 서로 비슷한 문자입니다. 여기에는 b / q, d / p 및 n / u가 포함됩니다. 나는 또한 M / W, Z / N, 그리고 물론 I / l (자본 i, 소문자 L)이라고 말할 것입니다. 아마도 표면을 긁을 수 있으므로 확실하지 않은 다른 것이 있으면 물어보십시오.

간단하게 유지하려면 표준 sans-serif 글꼴 (SE에서 사용 된 글꼴)로 제한하십시오.

접을 때까지 놀라운 치환을 할 수 있지만 B는 D, E, F, I, P 또는 R 일 수 있으며 실제로 창의적으로 접 으면 C 또는 L 일 수 있습니다. !

내 아이들과 비슷한 카드를 가지고 놀 면서이 문제를 생각해 냈습니다. 단면 카드를 만드는 것이 얼마나 쉬운 지와 양면 카드를 만드는 것이 얼마나 어려운지를 언급했습니다.

추가 : 가장 인기있는 답변에 수여되는 현상금을 제공했습니다. 동점이 있다면 먼저 제출 한 사람에게 수여합니다.

또 다른 힌트 :

  • 단면 문제를 해결하면 필요한 최소 카드 수를 알 수 있습니다 (예 : 20 개의 단면 카드는 최소 10 개의 양면 카드로 변환 됨)

추가 : 아 귀찮게, 바운티가 만료되는 것을 잊었다. 현상금이 시작되기 전에 유일한 답변이 제출 되었기 때문에 아무도 안가게되었습니다! 미안합니다.


3
명확히하기 위해 무엇이 허용됩니까? 유일한 대칭 쌍은 n/u, d/p? 무엇에 대한 b/q그리고 m/w? P카드를 두 개로 접 으면 상단이 반이되면 D어떻게합니까?
— Sp3000

3
1. 승인 된 "기호"목록으로, 잠재적 인 루프 구멍 인 글꼴에 따라 다를 수 있다고 생각합니다 (문자가 모두 같은 글꼴을 사용하십시오. 즉, 카드는 항상 / 2. "케이스가 중요하지 않다"고 "N"이 "u"로 표시 될 수 있습니까?
— David Rogers

나는 당신이 당신의 질문을 인기 콘테스트로 만들어 불의를하고 있다고 생각합니다. 당신은 사람들에게 창의력을 부여함으로써 창의성을 얻지 못하고, 어려운 도전을하고 그들이 할 수있는 모든 것을 짜내도록함으로써 그것을 얻습니다.
— xnor

@ sp3000-물론 b / q. 다른 질문에 대해서는 규칙을 명확히하겠습니다.

1
이것을 인기 콘테스트 (현상금을 언급하지 않음)로 갖는 것은 옳지 않습니다. 답변이 최적이라는 어떤 보증인이 있습니까? 하나의 답변이 차선의 결과를 제공하지만 어떤 이유로 어떤 이유로 가장 높은 표를 얻는다면 어떻게됩니까?
— Optimizer

답변:


5

C #-카드 선택기

요약

이 응용 프로그램은 무차별 대입 방법을 사용하여 각 목록을 해결하려고 시도합니다. 먼저 선택할 수있는 잠재적 인 카드 목록을 만든 다음 가장 적합한 것을 결정합니다 (가장 큰 문자를 제거하고 가장 긴 단어를 가장 짧게 만듭니다). 결과 목록에 추가하고 충분한 잠재적 카드를 선택할 때 까지이 프로세스를 계속합니다 목록의 모든 단어를 제거하려면 해당 카드를 각 단어와 다시 일치시키고 출력을 인쇄합니다.

제공된 Windows Forms 응용 프로그램을 다운로드하여 빌드하지 않고이 코드의보다 제한된 버전을 보려면 제공된 링크를 사용하여 더 작은 데이터 세트에서 프로그램을 실행할 수 있습니다.이 버전은 콘솔 응용 프로그램 버전이므로 카드가 회전하지 않습니다 : http://ideone.com/fork/VD1gJF

개정 이력

현재-@Zgarb가 제안한 더 나은 결과 최적화가 추가되었습니다.

업데이트 3-더 많은 코드 정리, 더 많은 버그 수정, 더 나은 결과

업데이트 2-Windows Forms, 더 자세한 출력

업데이트 1-문자 대칭에 대한 새로운 / 더 나은 지원

원본-콘솔 응용 프로그램

예

acr, aft, ain, sll, win, say, said, fast, epic 출력 0

그는, 의지, 의지, 의지, 의지, 의지, 아직, 당신, 청소년, youll 출력 1

aaaa, bbbb, cccc
출력 2

암호

나는 여전히 동일한 클래스와 메소드를 공유하는 ConsoleApp 및 WindowsForms 코드를 사용하여이를 하나의 큰 프로젝트에 결합 한 다음 RunButton_Click 메소드에서 다른 영역을 분리하여 시간을 찾을 때마다 주위에 단위를 작성할 수 있어야합니다. 나는 이것이 지금 내가 가진 것입니다 :

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CardChooserForms
{
    public partial class CardChooser : Form
    {
        private class Solution : IEquatable<Solution>
        {
            public List<string> Cards { get; set; }
            public List<string> Remaining { get; set; }

            public int RemainingScore
            {
                get
                {
                    return this.Remaining.Sum(b => b.ToCharArray().Count());
                }
            }

            public bool Equals(Solution other)
            {
                return new string(Cards.OrderBy(a => a).SelectMany(a => a).ToArray()) == new string(other.Cards.OrderBy(a => a).SelectMany(a => a).ToArray());
            }

            public override int GetHashCode()
            {
                return (new string(Cards.OrderBy(a => a).SelectMany(a => a).ToArray())).GetHashCode();
            }
        }
        private class Symmetry
        {
            public char Value { get; set; }
            public Int16 RotationDifference { get; set; }
        }

        /// <summary>
        /// This is where Symmetries are stored, right now it only has support for pairs(two values per array)
        /// </summary>
        private static Symmetry[][] _rotatableCharacters = new Symmetry[][] {                 
                new Symmetry[] { new Symmetry {Value = 'Z'}, new Symmetry {Value = 'N', RotationDifference = 90}}, 
                new Symmetry[] { new Symmetry {Value = 'd'}, new Symmetry {Value = 'p', RotationDifference = 180 }}, 
                new Symmetry[] { new Symmetry {Value = 'u'}, new Symmetry {Value = 'n', RotationDifference = 180 }}, 
                new Symmetry[] { new Symmetry {Value = 'm'}, new Symmetry {Value = 'w', RotationDifference = 180 }}, 
                new Symmetry[] { new Symmetry {Value = 'b'}, new Symmetry {Value = 'q', RotationDifference = 180 }}, 
                new Symmetry[] { new Symmetry {Value = 'l'}, new Symmetry {Value = 'I', RotationDifference = 0}},                 
            };

        //These all control the output settings
        private readonly static int _defualtSpacing = 25;
        private readonly static int _defualtFontSize = 8;
        private readonly static Font _defualtFont = new Font("Microsoft Sans Serif", _defualtFontSize);
        private readonly static Brush _defualtBackgroundColor = Brushes.Beige;
        private readonly static Brush _defualtForegroundColor = Brushes.Black;


        public CardChooser()
        {
            InitializeComponent();
        }

        private void RunButton_Click(object sender, EventArgs e)
        {            
            #region Input Parsing
            //Get input                         
            string input = InputRichTextBox.Text;

            if (!input.Contains(","))
                throw new ArgumentException("Input must contain more than one value and must be seprated by commas.");

            //Parse input
            var inputLowercasedTrimedTransformed = input.Split(',').Select(a => a.ToLowerInvariant().Trim()).ToArray();
            var inputSplitTrimIndex = input.Split(',').Select(a => a.Trim()).ToArray().Select((a, index) => new { value = a, index }).ToArray();
            #endregion Input Parsing

            #region Card Formation
            var inputCharParsed = inputLowercasedTrimedTransformed.Select(a => a.ToCharArray()).ToArray();
            var possibleCards = GetAllCasesTwoLengthArrayElements(
                UniqueBiDirection(
                //Get unique characters
                    inputCharParsed
                    .SelectMany(a => a)
                    .Distinct()
                    .Select(a => new
                    {
                        Character = a,
                        PossibleCharacters = inputCharParsed.SelectMany(b => b).Where(b => b != a).ToList()
                    })
                //Now get distinct cards(ie NB == BN, NB != NE)
                    .SelectMany(a => a.PossibleCharacters.Select(b => new string(new char[] { a.Character, b })).ToArray()).ToArray()
                    ).ToArray()
                ).ToArray();

            //Now get every possible character each card can eliminate
            var possibleCharsFromCards = GetAllPossibleCharsFromACards(possibleCards).ToArray();

            //Now set up some possibilities that contain only one card
            var possibleCardCombinations = possibleCards.Select((a, index) => new Solution
            {
                Cards = new List<string> { a },
                //Use the index of each card to reference the possible characters it can remove, then remove them per card to form a initial list of cards
                Remaining = inputLowercasedTrimedTransformed.Select(b => b.RemoveFirstInCharArr(possibleCharsFromCards[index].ToLowerInvariant().ToCharArray())).ToList()
            })
            //Take the best scoring card, discard the rest
            .OrderBy(a => a.RemainingScore)
            .ThenBy(a => a.Remaining.Max(b => b.Length))
            .Take(1).ToList();
            #endregion Card Formation

            #region Card Selection
            //Find best combination by iteratively trying every combination + 1 more card, and choose the lowest scoring one 
            while (!possibleCardCombinations.Any(a => a.Remaining.Sum(b => b.ToCharArray().Count()) == 0) && possibleCardCombinations.First().Cards.Count() < possibleCards.Count())
            {
                //Clear the list each iteration(as you can assume the last generations didn't work
                var newPossibilites = new List<Solution>();
                var currentRoundCardCombinations = possibleCardCombinations.ToArray();
                possibleCardCombinations.Clear();

                foreach (var trySolution in currentRoundCardCombinations)
                    foreach (var card in possibleCards.Select((a, index) => new { value = a, index }).Where(a => !trySolution.Cards.Contains(a.value)).ToArray())
                    {
                        var newSolution = new Solution();
                        newSolution.Cards = trySolution.Cards.ToList();
                        newSolution.Cards.Add(card.value);
                        newSolution.Remaining = trySolution.Remaining.ToList().Select(a => a.RemoveFirstInCharArr(possibleCharsFromCards[card.index].ToLowerInvariant().ToCharArray())).ToList();
                        newPossibilites.Add(newSolution);
                    }

                //Choose the highest scoring card
                possibleCardCombinations = newPossibilites
                    .OrderBy(a => a.RemainingScore)
                    .ThenBy(a => a.Remaining.Max(b => b.Length))
                    .Distinct().Take(1).ToList();
            }
            var finalCardSet = possibleCardCombinations.First().Cards.ToArray();
            #endregion Card Selection

            #region Output
            using (var image = new Bitmap(500, inputSplitTrimIndex.Count() * _defualtSpacing + finalCardSet.Count() * (_defualtFontSize / 2) + _defualtSpacing))
            using (Graphics graphic = Graphics.FromImage(image))
            {
                //Background
                graphic.FillRectangle(_defualtBackgroundColor, 0, 0, image.Width, image.Height);

                //Header                
                graphic.DrawString("Total Number of Cards Required: " + finalCardSet.Count(), _defualtFont, _defualtForegroundColor, new PointF(0, 0));
                graphic.DrawString(
                    "Cards: " + String.Join(", ", finalCardSet.Select(a => a[0] + "/" + a[1])),
                    _defualtFont,
                    _defualtForegroundColor,
                    new RectangleF(0, _defualtSpacing, image.Width - _defualtSpacing, finalCardSet.Count() * 5));

                //Results
                foreach (var element in inputSplitTrimIndex)
                {
                    //Paint the word
                    graphic.DrawString(element.value + " -> ", _defualtFont, _defualtForegroundColor, new PointF(0, element.index * _defualtSpacing + finalCardSet.Count() * (_defualtFontSize / 2) + _defualtSpacing));

                    //Now go through each character, determining the matching card, and wether that card has to be flipped
                    foreach (var card in GetOrderedCardsRequired(inputLowercasedTrimedTransformed[element.index].ToLowerInvariant(), finalCardSet.ToArray()).ToArray().Select((a, index) => new { value = a, index }))
                        using (var tempGraphic = Graphics.FromImage(image))
                        {
                            //For cards that need to flip
                            if (Char.ToUpperInvariant(element.value[card.index]) != Char.ToUpperInvariant(card.value[0]) &&
                                Char.ToUpperInvariant(element.value[card.index]) != Char.ToUpperInvariant(card.value[1]))
                            {
                                //TODO this is hacky and needs to be rethought
                                var rotateAmount = _rotatableCharacters
                                    .OrderByDescending(a => a.Any(b => b.Value == Char.ToLowerInvariant(element.value[card.index])))
                                    .First(a => a.Any(b => Char.ToUpperInvariant(b.Value) == Char.ToUpperInvariant(element.value[card.index])))
                                    [1].RotationDifference;

                                //Rotate
                                tempGraphic.TranslateTransform(
                                    _defualtSpacing * (_defualtFontSize / 2) + card.index * _defualtSpacing + (rotateAmount == 90 ? 0 : _defualtSpacing / 2) + (rotateAmount == 180 ? -(_defualtSpacing / 4) : 0),
                                    finalCardSet.Count() * (_defualtFontSize / 2) + _defualtSpacing + element.index * _defualtSpacing + (rotateAmount == 180 ? 0 : _defualtSpacing / 2));
                                tempGraphic.RotateTransform(rotateAmount);

                                //Print string
                                tempGraphic.DrawString(
                                String.Join("/", card.value.ToCharArray().Select(a => new string(new char[] { a })).ToArray()),
                                _defualtFont,
                                Brushes.Black,
                                new RectangleF(-(_defualtSpacing / 2), -(_defualtSpacing / 2), _defualtSpacing, _defualtSpacing));
                            }
                            else
                                tempGraphic.DrawString(
                                     String.Join("/", card.value.ToCharArray().Select(a => new string(new char[] { a })).ToArray()),
                                     _defualtFont,
                                     _defualtForegroundColor,
                                     new RectangleF(
                                         _defualtSpacing * (_defualtFontSize / 2) + card.index * _defualtSpacing,
                                         finalCardSet.Count() * (_defualtFontSize / 2) + _defualtSpacing + element.index * _defualtSpacing,
                                         _defualtSpacing, _defualtSpacing));
                        }
                }

                OutputPictureBox.Image = new Bitmap(image);
            }
            #endregion Output
        }

        private IEnumerable<string> GetAllPossibleCharsFromACards(string[] cards)
        {
            return cards.Select(a => 
                new string(a.ToCharArray().Concat(_rotatableCharacters
                                    .Where(b => b.Select(c => c.Value).Intersect(a.ToCharArray()).Count() > 0)
                                    .SelectMany(b => b.Select(c => c.Value))
                                    .Distinct().ToArray()).Distinct().ToArray()));
        }

        private IEnumerable<string> GetOrderedCardsRequired(string word, string[] cards)
        {
            var solution = new List<string>();
            var tempCards = GetAllPossibleCharsFromACards(cards).Select((a, index) => new { value = a, index }).ToList();

            foreach (var letter in word.ToCharArray())
            {
                //TODO this still could theoretically fail I think                
                var card = tempCards
                    //Order by the least number of characters match
                    .OrderBy(a => word.ToLowerInvariant().Intersect(a.value.ToLowerInvariant()).Count())
                    .ThenByDescending(a => tempCards.Sum(b => b.value.ToLowerInvariant().Intersect(a.value.ToLowerInvariant()).Count()))
                    //Then take the least useful card for the other parts of the word
                    .First(a => a.value.ToLowerInvariant().Contains(Char.ToLowerInvariant(letter)));
                solution.Add(cards[card.index]);
                tempCards.Remove(card);
            }
            return solution;
        }

        private static IEnumerable<string> UniqueBiDirection(string[] input)
        {
            var results = new List<string>();
            foreach (var element in input)
                if (!results.Any(a => a == new string(element.ToCharArray().Reverse().ToArray()) || a == element))
                    results.Add(element);
            return results;
        }

        private static IEnumerable<string> GetAllCasesTwoLengthArrayElements(string[] input)
        {
            if (input.Any(a => a.Length != 2))
                throw new ArgumentException("This method is only for arrays with two characters");

            List<string> output = input.ToList();
            foreach (var element in input)
            {
                output.Add(new string(new char[] { Char.ToUpperInvariant(element[0]), Char.ToUpperInvariant(element[1]) }));
                output.Add(new string(new char[] { element[0], Char.ToUpperInvariant(element[1]) }));
                output.Add(new string(new char[] { Char.ToUpperInvariant(element[0]), element[1] }));
            }
            return output;
        }

        private void SaveButton_Click(object sender, EventArgs e)
        {
            using (var image = new Bitmap(OutputPictureBox.Image))
                image.Save(Directory.GetCurrentDirectory() + "Output.png", ImageFormat.Png);
        }
    }

    public static class StringExtensions
    {
        public static string RemoveFirstInCharArr(this string source, char[] values)
        {
            var tempSource = source.ToUpperInvariant();
            foreach (var value in values)
            {
                int index = tempSource.IndexOf(Char.ToUpperInvariant(value));
                if (index >= 0) return source.Remove(index, 1);
            }
            return source;
        }        
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CardChooserForms
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new CardChooser());
        }
    }
}


namespace CardChooserForms
{
    partial class CardChooser
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.InputRichTextBox = new System.Windows.Forms.RichTextBox();
            this.EnterInputLabel = new System.Windows.Forms.Label();
            this.RunButton = new System.Windows.Forms.Button();
            this.OutputPictureBox = new System.Windows.Forms.PictureBox();
            this.OutputPanel = new System.Windows.Forms.Panel();
            this.SaveButton = new System.Windows.Forms.Button();
            ((System.ComponentModel.ISupportInitialize)(this.OutputPictureBox)).BeginInit();
            this.OutputPanel.SuspendLayout();
            this.SuspendLayout();
            // 
            // InputRichTextBox
            // 
            this.InputRichTextBox.Location = new System.Drawing.Point(60, 40);
            this.InputRichTextBox.Name = "InputRichTextBox";
            this.InputRichTextBox.Size = new System.Drawing.Size(400, 100);
            this.InputRichTextBox.TabIndex = 0;
            this.InputRichTextBox.Text = "";
            // 
            // EnterInputLabel
            // 
            this.EnterInputLabel.AutoSize = true;
            this.EnterInputLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.EnterInputLabel.Location = new System.Drawing.Point(57, 20);
            this.EnterInputLabel.Name = "EnterInputLabel";
            this.EnterInputLabel.Size = new System.Drawing.Size(81, 17);
            this.EnterInputLabel.TabIndex = 1;
            this.EnterInputLabel.Text = "Enter Input:";
            // 
            // RunButton
            // 
            this.RunButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.RunButton.Location = new System.Drawing.Point(60, 147);
            this.RunButton.Name = "RunButton";
            this.RunButton.Size = new System.Drawing.Size(180, 52);
            this.RunButton.TabIndex = 2;
            this.RunButton.Text = "Run";
            this.RunButton.UseVisualStyleBackColor = true;
            this.RunButton.Click += new System.EventHandler(this.RunButton_Click);
            // 
            // OutputPictureBox
            // 
            this.OutputPictureBox.Location = new System.Drawing.Point(3, 3);
            this.OutputPictureBox.Name = "OutputPictureBox";
            this.OutputPictureBox.Size = new System.Drawing.Size(500, 500);
            this.OutputPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
            this.OutputPictureBox.TabIndex = 3;
            this.OutputPictureBox.TabStop = false;
            // 
            // OutputPanel
            // 
            this.OutputPanel.AutoScroll = true;
            this.OutputPanel.Controls.Add(this.OutputPictureBox);
            this.OutputPanel.Location = new System.Drawing.Point(4, 205);
            this.OutputPanel.Name = "OutputPanel";
            this.OutputPanel.Size = new System.Drawing.Size(520, 520);
            this.OutputPanel.TabIndex = 4;
            // 
            // SaveButton
            // 
            this.SaveButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.SaveButton.Location = new System.Drawing.Point(280, 147);
            this.SaveButton.Name = "SaveButton";
            this.SaveButton.Size = new System.Drawing.Size(180, 52);
            this.SaveButton.TabIndex = 5;
            this.SaveButton.Text = "Save";
            this.SaveButton.UseVisualStyleBackColor = true;
            this.SaveButton.Click += new System.EventHandler(this.SaveButton_Click);
            // 
            // CardChooser
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(534, 737);
            this.Controls.Add(this.SaveButton);
            this.Controls.Add(this.RunButton);
            this.Controls.Add(this.EnterInputLabel);
            this.Controls.Add(this.InputRichTextBox);
            this.Controls.Add(this.OutputPanel);
            this.Name = "CardChooser";
            this.Text = "Card Chooser";
            ((System.ComponentModel.ISupportInitialize)(this.OutputPictureBox)).EndInit();
            this.OutputPanel.ResumeLayout(false);
            this.OutputPanel.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.RichTextBox InputRichTextBox;
        private System.Windows.Forms.Label EnterInputLabel;
        private System.Windows.Forms.Button RunButton;
        private System.Windows.Forms.PictureBox OutputPictureBox;
        private System.Windows.Forms.Panel OutputPanel;
        private System.Windows.Forms.Button SaveButton;
    }
}

1
i카드 없이 "마법"을 어떻게 쓰 십니까?
— Claudiu

"물론 I / l (자본 i, 소문자 L)"이므로 소문자 l은 대문자 I를 나타냅니다.
— David Rogers

아, 그것은 당신이 출력에서 ​​그것을 지정 해야하는 것 같습니다
— Claudiu

@Claudiu 그래, 나는 그것에 대해 잠시 동안 생각했다. 이것은 내가 Yimin Rong에게 물었던 두 번째 질문에 달려 있으며 카드에 "l"을 출력하면 정확히 그것을 명확히했다고 생각합니다. 대문자 I 및 ​​하위 l 모두에 사용할 수 있습니다. 결과가 완벽하게 일치하지 않는 결과를 얻을 수는 있지만 여전히 질문의 조건을 만족시키기 때문에 "OK"라고 생각하지만 다시 열려 있습니다. 필요한 경우, 아마도 나중 버전에서 결과로 생성 된 문자열을 회전 된 문자 또는 이와 유사한 것으로 출력 할 수 있습니다.
— David Rogers

실수가 있다고 생각합니다. said의 마지막 편지는 W 또는 P가 아닙니다
— 자랑스러운 Haskeller
당사 사이트를 사용함과 동시에 당사의 쿠키 정책과 개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.