«permutations» etiketlenmiş sorular

Permütasyon, bazı nesne listelerinin özel bir sıralamasıdır. Permütasyon ile etiketlenmiş problemler genellikle metin anagramları dahil permütasyonların bulunmasını veya üretilmesini içerir.

7
Jacobian matrisini oluşturma
Bilinmeyenlerin vektörünü alın ve bazı genel türevlenebilir fonksiyonlar uygulayın . Daha sonra Jacobian bir matris tarafından şöyle verilir : Örneğin, m=3ve varsayalım n=2. Sonra (0 tabanlı indeksleme kullanarak) Arasında Jacobi fdaha sonra Bu zorluğun amacı bu Jacobian matrisini basmaktır. Giriş Programınız / fonksiyon girişi iki pozitif tamsayı olarak almalı mve …

2
Gönüllü dilbilimci
Arka fon Bir dilbilimci olan arkadaşınız, çeşitli dillerde basit konuşma snippet'lerini kaydetti ve analiz etti. Oldukça düşüncesiz oldukları için, her pasajın hangi dilde olduğunu unutmuşlar. Cümle yapılarını analiz eden ve imkansız vakaları dışlayan bir program oluşturarak onlara yardım etmelisiniz. Giriş Girişiniz , konu , fiil ve nesneSVO anlamına gelen karakterleri …

4
Yeniden Düzenleme Eşitsizliği
Arka fon Düzenlenme Eşitsizlik numaralarını yeniden düzenleyerek dayanan bir eşitsizlik olduğunu. Aynı uzunlukta iki sayı listem varsa, x 0 , x 1 , x 2 ... x n-1 ve y 0 , y 1 , y 2 ... y n-1 aynı uzunlukta, burada ben listedeki sayıları yeniden düzenlememe izin verildi, …


7
Code-Golf: Farey dizisi (I)
Meydan okuma Bu görevde bir tamsayı N (10 ^ 5'ten az) verilecek , Farey sırasının N sırasını vereceksiniz . Giriş N tek bir satırda verilir, girişler EOF tarafından sonlandırılır. Giriş 4 3 1 2 Çıktı F4 = {0/1, 1/4, 1/3, 1/2, 2/3, 3/4, 1/1} F3 = {0/1, 1/3, 1/2, 2/3, …
10 code-golf  math  code-golf  math  code-golf  number  number-theory  code-golf  math  arithmetic  repeated-transformation  code-golf  geometry  popularity-contest  code-golf  code-golf  tips  haskell  math  fastest-algorithm  code-golf  combinatorics  code-golf  math  polynomials  rational-numbers  code-golf  code-golf  popularity-contest  javascript  code-golf  kolmogorov-complexity  code-golf  code-golf  math  combinatorics  permutations  code-challenge  restricted-source  random  array-manipulation  code-challenge  generation  code-golf  code-golf  ascii-art  arithmetic  division  code-challenge  number  code-golf  math  number  binary  code-golf  ascii-art  code-golf  interpreter  stack  code-golf  internet  networking  code-golf  math  code-golf  ascii-art  code-golf  math  sequence  code-golf  hello-world  restricted-source  code-golf  ascii-art  code-golf  geometry  code-golf  kolmogorov-complexity  pi  code-golf  math  combinatorics  permutations  code-golf  math  code-challenge  ascii-art  code-golf  string  code-golf  quine  code-golf  math  floating-point  golfscript  code-golf  string  code-golf  sliding-puzzle  code-challenge  arithmetic  code-golf  math  code-golf  geometry  optimized-output 

2
Quarto'da kaç tane çekiliş var?
Giriş Bu zorluk Project Euler sorunlarına benzer . Aldattım çünkü aldatıcı derecede basit bir masa oyunu oynuyordum ve mekaniği hakkında basit bir soruyu cevaplamak için etkili bir çözüm bulamadım. Quarto arka arkaya 4 eğlenceli bir çeşididir. 16 benzersiz parça ile 4'e 4 kartta oynanır (hiçbir parça kopyalanmaz). Her turda her …

6
Bir vektörün tüm farklı permütasyonlarını çıktılar
Meydan okuma: Potansiyel olarak uzun bir pozitif tamsayılar listesinin tüm farklı permütasyonlarını çıktılar. Test sırasında vektörün 1000'den az sayıya sahip olduğunu varsayabilirsiniz, ancak işlem teorik olarak boyuttan bağımsız olarak birden fazla sayıya sahip herhangi bir vektör için çalışmalıdır. Kısıtlamalar: Bellek kullanımını O (n ^ 2) ile sınırlandırmalısınız; burada n , …

7
Sahte sahte Golf!
Giriş / Arka Plan Bir de son tartışmada yer kripto sohbet Birlikte / yardım görüşmek üzere meydan Fermat asallık testi ve Carmichael numaraları. Bu test a^(p-1) mod p==1her zaman primler için geçerli olacak p, ancak her zaman kompozitler için geçerli olmayan öncüllere dayanmaktadır . Bir dizi kendisi için: Artık bir …
9 code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

13
Expand Karşılaştırma Zincirleri
Çoğu dilden farklı a<b<colarak Python , boole a<bile karşılaştırmanın aksine, aslında üç sayıyı karşılaştırarak matematikte olduğu gibi değerlendirir c. Bunu C (ve diğerleri) yazmanın doğru yolu olurdu a<b && b<c. Bu meydan okumada, göreviniz keyfi uzunluklardaki bu tür karşılaştırma zincirlerini Python / sezgisel sunumdan diğer dillerde nasıl yazılacağına genişletmektir. Özellikler …
9 code-golf  parsing  conversion  syntax  code-golf  sequence  primes  code-challenge  geometry  optimization  code-golf  graph-theory  code-golf  number-theory  primes  integer  code-golf  source-layout  cops-and-robbers  code-golf  source-layout  cops-and-robbers  code-golf  sequence  primes  integer  code-golf  math  number-theory  primes  rational-numbers  code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

30
İnt girişi n verildiğinde, çıktı n * ters çevrilmiş (n)
Bir tam sayı verildiğinde n, çıktı alınn * reversed(n) reversed(n)reverserakamları ile elde ettiğiniz sayıdır n. reverse(512) = 215 reverse(1) = 1 reverse(101) = 101 >>>>>>>> func(5) = 5*5 = 25 func(12) = 12*21 = 252 func(11) = 11*11 = 121 func(659) = 659*956 = 630004 En kısa kod kazanır! Liderler …
9 code-golf  math  arithmetic  code-golf  math  integer  code-golf  arithmetic  integer  code-golf  sequence  base-conversion  palindrome  code-golf  math  primes  integer  code-golf  parsing  conversion  syntax  code-golf  sequence  primes  code-challenge  geometry  optimization  code-golf  graph-theory  code-golf  number-theory  primes  integer  code-golf  source-layout  cops-and-robbers  code-golf  source-layout  cops-and-robbers  code-golf  sequence  primes  integer  code-golf  math  number-theory  primes  rational-numbers  code-golf  math  sequence  number-theory  primes  code-golf  string  code-golf  math  combinatorics  permutations  restricted-complexity  code-golf  array-manipulation  code-golf  number  sequence  code-golf  number  sequence  code-golf  binary-matrix  code-golf  math  tips  javascript  algorithm  code-golf  string  code-golf  number  sequence  code-golf  math  arithmetic  parsing  code-golf  number  sequence  primes  code-golf  string  ascii-art  geometry  integer  code-golf  geometry  code-golf  number  array-manipulation  code-golf  math  geometry  code-golf  number  sequence  arithmetic  integer  code-golf  string  kolmogorov-complexity  code-golf  number  code-golf  number  chess  code-golf  sequence  decision-problem  subsequence  code-golf  math  number  primes  code-golf  primes  permutations  code-golf  integer  probability-theory  statistics  code-golf  string  code-golf  sequence  decision-problem  parsing  board-game  code-golf  binary  graph-theory  code-golf  board-game  classification  tic-tac-toe  code-golf  ascii-art  polyglot  code-golf  date  code-golf  geometry 

11
Permüratör İnşa Et
Bu zorluk için bir listeyi girdi olarak alan ve bu listenin permütasyonunu döndüren bir fonksiyon (fonksiyonunuz tam bir program olabilir) yapacaksınız. İşleviniz aşağıdaki gereksinimlere uymalıdır. Deterministik olmalı. İşlevinizi kendisiyle değişken sayıda oluşturmak, permütasyonlarından herhangi birine bir liste alabilmelidir. Bu bir kod golf sorusudur, bu nedenle cevaplar bayt cinsinden puanlandırılacak, daha …

2
En sık kullanılan on yüz kelime
Bu soru yazılmıştır, çünkü "Şey Açıklayıcı" okuması eğlenceli ve bana bir fikir verdi. Bir dizi harf, sayı ve bunun gibi şeyleri okuyan / alan "#%|?ve True / 1tüm sözcükler bu kümenin bir parçasıysa geri dönen "bilgisayarı bir şeyler yapan şeyler" yazın . Tüm kelimeler bu kümenin parçası değilse, parçası olmayan …
9 code-golf  string  parsing  code-golf  array-manipulation  random  permutations  code-golf  string  code-golf  parsing  code-golf  string  quine  code-golf  string  parsing  comment  code-golf  string  counting  natural-language  code-golf  string  decision-problem  code-golf  math  code-challenge  metagolf  test-battery  code-golf  string  code-golf  math  number  arithmetic  source-layout  code-golf  number  primes  decision-problem  code-golf  math  arithmetic  code-golf  date  code-golf  string  cryptography  code-golf  code-golf  chess  board-game  code-golf  geometry  grid  puzzle-solver  set-partitions  code-golf  number  natural-language  code-golf  ascii-art  code-golf  math  code-golf  string  ascii-art  kolmogorov-complexity  code-golf  string  natural-language  code-golf  game  board-game  tic-tac-toe  code-golf  ascii-art  hexagonal-grid  code-golf  string  comment  code-golf  internet  code-golf  sorting  code-golf  kolmogorov-complexity  unicode  code-golf  tips  code-golf  string  natural-language  code-golf  string  kolmogorov-complexity  source-layout  hello-world  code-golf  string  kolmogorov-complexity  counting  natural-language  code-golf  random  quine  code-golf  string  math  bitwise  code-golf  permutations  code-golf  string  code-golf  arithmetic 

15
Bir eşlemeyi karıştır
Bir haritayı bir dizi anahtar / değer çifti olarak tanımlıyoruz. Bu meydan okuma için, değerlerin her birini almanız ve bunları rastgele seçilen bir anahtara atamanız gerekir. Sen gerekir rastgele ortaya çıkan harita değerlerini karıştırmak ve çıkışı. Bu, programınızı her çalıştırdığımızda farklı bir çıktı alma şansımız olduğu anlamına gelir Değerlerin olası …

6
Simetrik Sn grubunun “çift” permütasyonlarını döngüsel gösterimde yazdırın
GÖREV TANIMLAR {1,2,3,4,5} noktalarını ve bunların tüm permütasyonlarını düşünün. Bu 5 noktanın toplam olası permütasyon sayısını basit bir numarayla bulabiliriz: 5 yuvayı bu noktalarla doldurarak görüntüleme, ilk yuva 5 olası sayıya, ikinci 4'e (biri ilk yuvayı doldurmak için kullanıldığından) üçüncü 3 vb. Böylece toplam Permütasyon sayısı 5 * 4 * …

4
Küratörün İkilemi
Giriş Dört sanatçiden ( bazıları küratöre sıfır sanat eseri, genç alçaklar verebilir) modern sanattan zevk almakta olan bir sanat müzesi küratörünün arkadaşısınız . Bu modern sanat olduğundan, herhangi bir sanatçının eserleri tamamen aynı görünüyor. Arkadaşınız bu parçaları hangi sırayla yerleştireceğinize karar vermek için bir bilgisayar kullanmak istiyor. Program Gereksinimleri Programınız …

Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.