Görüntüyü Yama ruhuyla, benzer bir meydan okuma ancak metinle birlikte.
Meydan okuma
Bit çürüklüğü değerli metninizi etkiledi! ASCII karakterlerinden oluşan ve içinde bir yerde dikdörtgen bir delik olan bir paragraf göz önüne alındığında, programınız deliği uygun metinle doldurmaya çalışmalı, böylece paragraf olabildiğince iyi karışmalıdır.
Diğer tanımlar
- Delik her zaman dikdörtgen olacak ve birden çok satıra yayılabilir.
- Sadece bir delik olacak.
- Deliğin mutlaka kelime sınırlarının üstüne düşmediğine dikkat edin (aslında, genellikle olmaz).
- Delik, giriş paragrafının en fazla% 25'ini oluşturur, ancak "normal" metnin "sonunu" geçebilir veya uzatabilir (aşağıdaki Euclid veya Porsuk örneklerine bakın).
- Deliği bulmak bu zorluğun ana noktası olmadığından, sadece karışık işaretlerden oluşacaktır.
#
için, kolay tanımlama için . - Giriş paragrafındaki başka hiçbir yerde bir karma işareti olmaz.
- Kodunuz aşağıdaki örneklerde "normal" metni kullanamaz - metni yalnızca üzerinde delik bulunan metni alır ve işler.
- Girdi, tek bir çok satırlı dize, bir dizge dizisi (satır başına bir öğe), bir dosya vb. Olabilir - diliniz için en uygun olanı seçin.
- İstenirse, deliğin koordinatlarını ayrıntılandıran isteğe bağlı bir ek girdi alınabilir (örneğin, bir koordinat grubu veya benzeri).
- Lütfen algoritmanızı gönderiminizde açıklayınız.
oylama
Seçmenlerden algoritmanın metin deliğini ne kadar iyi doldurduğuna dayanarak girdileri yargılamaları istenir. Bazı öneriler şunları içerir:
- Doldurulan alan, paragrafın geri kalanı olarak yaklaşık boşluk dağılımı ve noktalama işaretleri ile uyuşuyor mu?
- Doldurulan alan hatalı sözdizimi içeriyor mu? (örneğin, art arda iki boşluk, bir soru işareti ardından gelen bir periyot, hatalı bir sıralama
, ,
vb.) - Gözlerini kısarsan (aslında metni okumazsan), deliğin nerede olduğunu görebiliyor musun?
- Deliğin dışında bir CamelCase kelimesi yoksa, delik herhangi bir şey içeriyor mu? Deliğin dışında Büyük Harfler yoksa, delikte herhangi bir madde var mı? Delik Dışı Harfli Çok Büyük Harfler Varsa, delik orantılı bir miktar içeriyor mu?
Geçerlilik Kriteri
Bir başvurunun geçerli sayılması için paragrafın dışındaki herhangi bir metni (boşluklar dahil) değiştirmemelidir. Sonunda tek bir izleyen yeni satır isteğe bağlıdır.
Test Kılıfları
Biçim, bir kod bloğundaki orijinal paragraftır, ardından bir delikli aynı paragraftır. Giriş için delikli paragraflar kullanılacaktır.
1 (Resmi Düzeltme)
In a popular image editing software there is a feature, that patches (The term
used in image processing is inpainting as @minxomat pointed out.) a selected
area of an image, based on the information outside of that patch. And it does a
quite good job, considering it is just a program. As a human, you can sometimes
see that something is wrong, but if you squeeze your eyes or just take a short
glance, the patch seems to fill in the gap quite well.
In a popular image editing software there is a feature, that patches (The term
used in image processing is inpainting as @minxomat pointed out.) a selected
area of an image, #############information outside of that patch. And it does a
quite good job, co#############is just a program. As a human, you can sometimes
see that something#############t if you squeeze your eyes or just take a short
glance, the patch seems to fill in the gap quite well.
2 (Gettysburg Adresi)
But, in a larger sense, we can not dedicate, we can not consecrate, we can not
hallow this ground. The brave men, living and dead, who struggled here, have
consecrated it, far above our poor power to add or detract. The world will
little note, nor long remember what we say here, but it can never forget what
they did here. It is for us the living, rather, to be dedicated here to the
unfinished work which they who fought here have thus far so nobly advanced. It
is rather for us to be here dedicated to the great task remaining before us-
that from these honored dead we take increased devotion to that cause for which
they gave the last full measure of devotion-that we here highly resolve that
these dead shall not have died in vain-that this nation, under God, shall have
a new birth of freedom-and that government of the people, by the people, for
the people, shall not perish from the earth.
But, in a larger sense, we can not dedicate, we can not consecrate, we can not
hallow this ground. The brave men, living and dead, who struggled here, have
consecrated it, far above our poor power to add or detract. The world will
little note, nor long remember what we say here, but it can never forget what
they did here. It is for us the living, rather, to be dedicated here to the
unfinished work which they who fought here h######################advanced. It
is rather for us to be here dedicated to the######################before us-
that from these honored dead we take increas######################use for which
they gave the last full measure of devotion-######################solve that
these dead shall not have died in vain-that ######################, shall have
a new birth of freedom-and that government of the people, by the people, for
the people, shall not perish from the earth.
3 (Lorem Ipsum)
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo conse################irure dolor in reprehenderit
in voluptate velit esse cil################giat nulla pariatur. Excepteur
sint occaecat cupidatat non################in culpa qui officia deserunt
mollit anim id est laborum.
4 (Jabberwocky)
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe;
All mimsy were the borogoves,
And the mome raths outgrabe.
'Twas brillig, and the slithy toves
Did gyre a######### in the wabe;
All mimsy #########borogoves,
And the mome raths outgrabe.
5 (Öklid'in Pisagor Teoremi İspatı)
1.Let ACB be a right-angled triangle with right angle CAB.
2.On each of the sides BC, AB, and CA, squares are drawn,
CBDE, BAGF, and ACIH, in that order. The construction of
squares requires the immediately preceding theorems in Euclid,
and depends upon the parallel postulate. [footnote 14]
3.From A, draw a line parallel to BD and CE. It will
perpendicularly intersect BC and DE at K and L, respectively.
4.Join CF and AD, to form the triangles BCF and BDA.
5.Angles CAB and BAG are both right angles; therefore C, A,
and G are collinear. Similarly for B, A, and H.
6.Angles CBD and FBA are both right angles; therefore angle ABD
equals angle FBC, since both are the sum of a right angle and angle ABC.
7.Since AB is equal to FB and BD is equal to BC, triangle ABD
must be congruent to triangle FBC.
8.Since A-K-L is a straight line, parallel to BD, then rectangle
BDLK has twice the area of triangle ABD because they share the base
BD and have the same altitude BK, i.e., a line normal to their common
base, connecting the parallel lines BD and AL. (lemma 2)
9.Since C is collinear with A and G, square BAGF must be twice in area
to triangle FBC.
10.Therefore, rectangle BDLK must have the same area as square BAGF = AB^2.
11.Similarly, it can be shown that rectangle CKLE must have the same
area as square ACIH = AC^2.
12.Adding these two results, AB^2 + AC^2 = BD × BK + KL × KC
13.Since BD = KL, BD × BK + KL × KC = BD(BK + KC) = BD × BC
14.Therefore, AB^2 + AC^2 = BC^2, since CBDE is a square.
1.Let ACB be a right-angled triangle with right angle CAB.
2.On each of the sides BC, AB, and CA, squares are drawn,
CBDE, BAGF, and ACIH, in that order. The construction of
squares requires the immediately preceding theorems in Euclid,
and depends upon the parallel postulate. [footnote 14]
3.From A, draw a line parallel to BD and CE. It will
perpendicularly intersect BC and DE at K and L, respectively.
4.Join CF and AD, to form the triangles BCF and BDA.
5.Angles CAB and BAG are both right angles; therefore C, A,
and G are #############milarly for B, A, and H.
6.Angles C#############e both right angles; therefore angle ABD
equals ang############# both are the sum of a right angle and angle ABC.
7.Since AB#############FB and BD is equal to BC, triangle ABD
must be co#############iangle FBC.
8.Since A-#############ight line, parallel to BD, then rectangle
BDLK has t############# of triangle ABD because they share the base
BD and hav#############titude BK, i.e., a line normal to their common
base, conn#############rallel lines BD and AL. (lemma 2)
9.Since C #############with A and G, square BAGF must be twice in area
to triangl#############
10.Therefo############# BDLK must have the same area as square BAGF = AB^2.
11.Similar############# shown that rectangle CKLE must have the same
area as square ACIH = AC^2.
12.Adding these two results, AB^2 + AC^2 = BD × BK + KL × KC
13.Since BD = KL, BD × BK + KL × KC = BD(BK + KC) = BD × BC
14.Therefore, AB^2 + AC^2 = BC^2, since CBDE is a square.
6 (Porsuk, Porsuk, Porsuk weebl tarafından)
Badger, badger, badger, badger, badger,
badger, badger, badger, badger, badger
Mushroom, mushroom, a-
Badger, badger, badger, badger, badger,
badger, badger, badger, badger, badger
Mushroom, mushroom, a-
Badger, badger, badger, badger, badger,
badger, badger, badger, badger, badger
Mush-mushroom, a
Badger, badger, badger, badger, badger,
badger, badger, badger, badger, badger
Argh! Snake, a snake!
Snaaake! A snaaaake, oooh its a snake!
Badger, badger, badger, badger, badger,
badger, badger, badger, badger, badger
Mushroom, mushroom, a-
Badger##################badger, badger,
badger##################badger, badger
Mushro##################
Badger##################badger, badger,
badger##################badger, badger
Mush-mushroom, a
Badger, badger, badger, badger, badger,
badger, badger, badger, badger, badger
Argh! Snake, a snake!
Snaaake! A snaaaake, oooh its a snake!