«array-manipulation» 태그된 질문

어레이의 사용법과 조작을 통해 특정 문제를 해결하기위한 경쟁.

23
배열 열거
양의 정수 n엔n 주어지면 nnn 객체의 모든 배열이 생성 됩니다. 세부 변위는 고정 점이없는 순열입니다. (이는 모든 배치 번호에서 iii 가 iii 번째 항목에 있을 수 없음을 의미합니다 ). 출력은 숫자의 배열 (1,2,…,n)(1,2,…,n)(1,2,\ldots,n) (또는 대안 적으로 (0,1,2,…,n−1)(0,1,2,…,n−1)(0,1,2,\ldots,n-1) )로 구성되어야합니다. 다른 방법으로 항상 (n,n−1,…,1)(n,n−1,…,1)(n,n-1,\ldots,1) (또는 각각 (n−1,n−2,…,1,0)(n−1,n−2,…,1,0)(n-1,n-2,\ldots,1,0) 배열을 인쇄 할 수 …

26
총 슬롯 계산
각 작업을 수행 할 때 순서대로 수행해야하는 작업 목록이 주어지면 작업을 수행 한 후 다음 두 슬롯에 대해 동일한 작업을 수행 할 수없는 경우 모든 작업을 수행하는 데 걸리는 시간 (슬롯 냉각) )? 그러나이 냉각 슬롯에 다른 작업을 할당 할 수 있습니다. 예를 들어 [9,10,9,8] => output: 5 작업으로 할당 …

3
죽은 개구리 걷기
소개 Jonny는 Frogger를하고 싶다. 그러나 그는 매우 좋지 않습니다. 실제로, 그는 플랫폼이 이동 한 후에 만 ​​앞으로 나아가려고 시도 할 것입니다. Jonny의 개구리가 길의 끝에 도달했는지 또는 길에서 죽었는지 알아보십시오. 도전 프로그램은 다음 형식 으로 0s와 1s 로 구성된 Frogger 그리드를 입력으로 수신 합니다. 격자는 임의의 너비와 길이, 그리고 최소 …

24
시퀀스 단계 가져 오기
도전 일련의 숫자가 주어지면 순서 단계를 반환하는 함수를 만듭니다. 시퀀스가 N >= 3 시퀀스는 적어도 한 번은 단계를 반복합니다 시퀀스는 자연수 만 포함합니다 함수 또는 프로그램은 가능한 가장 짧은 단계 시퀀스를 리턴해야합니다. 예: 입력: [1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17] 산출: [1, 1, …


7
1D 호핑 배열 미로
에서 영감을 우리는 타워 도약을 하고 관련 2D 미로 마이너스 1D 소개 당신의 임무는 지정된 규칙에 따라 배열 미로에서 벗어날 수있는 가장 짧은 경로를 찾는 것입니다. 도전 n 개의 요소를 갖는 1D 어레이 a 는 n 개의 포인트 로 구성된 미로로 간주 될 수 있으며 , 여기서 인덱스 k 를 …

14
우리는 탑 호핑을한다
직무 음이 아닌 정수로 구성된 배열 a 위치 0에서 시작하여 배열을 "밖으로"점프하는 데 필요한 최소 오른쪽 점프 수를 결정하거나 불가능한 경우 0 / 널을 리턴하십시오. 점프 인덱스로부터는 i최대로 배열 인덱스의 증가로 정의되며a[i] . 점프 외부는 점프에 의한 인덱스 점프이다 i그래서 1 기반 인덱싱, 아웃 오브 바운드 어레이입니다 i>length(a), 0 계 …

27
목록을 빠르게 재 그룹화
그룹화는 목록을 가져 와서 동일한 인접 요소의 새로운 목록으로 나눕니다. 예를 들어 [1,1,2,1,1] -> [[1,1],[2],[1,1]] 그런 다음이 그룹의 길이를 사용하면 새로운 정수 목록을 얻습니다. [1,1,2,1,1] -> [2,1,2] 당신의 임무는 양의 정수 목록을 취하는 프로그램을 작성하고 결과 목록이 단일 요소를 갖기 전에 그룹화하고 길이를 지정할 수있는 횟수를 찾는 것입니다. 예를 들어 …

30
사라지는 요소
문자열 S과 인덱스 목록이 제공 되면의 결과를 새 값으로 사용하면서의 각 인덱스에서 요소를 제거하여 X수정 S하십시오 .SS 예를 들어 given S = 'codegolf'및 X = [1, 4, 4, 0, 2], 0 1 2 3 4 5 6 7 | c o d e g o l f | Remove 1 …
17 code-golf  string  array-manipulation  code-golf  string  ascii-art  code-golf  number  sequence  pi  code-golf  number  array-manipulation  code-golf  string  ascii-art  code-golf  math  number  game  code-golf  math  sequence  polynomials  recursion  code-golf  math  number  sequence  number-theory  code-golf  permutations  balanced-string  code-golf  string  ascii-art  integer  code-golf  decision-problem  hexagonal-grid  code-golf  ascii-art  kolmogorov-complexity  code-golf  number  code-golf  matrix  binary-matrix  code-golf  math  statistics  code-golf  string  polyglot  code-golf  random  lost  code-golf  date  path-finding  code-golf  string  code-golf  math  number  arithmetic  number-theory  code-golf  tetris  binary-matrix  code-golf  array-manipulation  sorting  code-golf  number  code-golf  array-manipulation  rubiks-cube  cubically  code-golf  grid  optimization  code-golf  math  function  code-golf  string  quine  code-golf  ascii-art  grid  code-golf  decision-problem  grid  simulation  code-golf  math  sequence  code-golf  path-finding  code-golf  ascii-art  grid  simulation  code-golf  number  whitespace  code-golf  sequence  code-golf  sequence  code-golf  sequence  integer  code-golf  math  game  code-golf  internet  stack-exchange-api  code-golf  sequence  code-golf  internet  stack-exchange-api  code-golf  math  factoring  code-challenge  sequence  polyglot  rosetta-stone  code-golf  string  browser  code-golf  date  code-golf  base-conversion  code-challenge  cops-and-robbers  hello-world  code-golf  cops-and-robbers  hello-world 

25
간단한 패턴
입력 : 선택한 입력 형식의 두 개의 단일 자릿수 ( m및 n) 및 두 자릿수 ( a및 b)를 입력하십시오. 산출: 연습을 위해 척하십시오 m=2, n=5, a='a', b='b'. 출력은 4 개의 입력으로 구성된 문자열입니다. resultvalue를 사용 하여 문자열을 호출 해 봅시다 "". 첫째, CONCATENATE a위에 result m배, CONCATENATE 그래서 a위에 result …
17 code-golf  string  code-golf  arithmetic  code-golf  string  array-manipulation  rubiks-cube  code-golf  math  number  code-golf  tips  bash  code-golf  ascii-art  music  code-golf  arithmetic  code-golf  math  number  arithmetic  integer  code-golf  number  array-manipulation  code-golf  geometry  grid  set-partitions  code-golf  math  number  code-golf  combinatorics  code-golf  regular-expression  code-golf  permutations  code-golf  ascii-art  code-golf  number  array-manipulation  matrix  code-golf  kolmogorov-complexity  compile-time  cops-and-robbers  polyglot  cops-and-robbers  polyglot  code-golf  string  code-golf  string  ascii-art  matrix  animation  code-golf  ascii-art  code-golf  string  balanced-string  code-golf  integer  integer-partitions  expression-building 

13
역 순열 인덱스
소개 n 개의 요소 를 가진리스트의 사전 식 순열은 0에서 n 까지 번호가 매겨 질 수 있습니다 ! -1. 예를 들어, 3! = 6 순열 (1,2,3)것 (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1). 순열이 목록에 적용되면 해당 요소는 순열의 숫자와 동일한 순서로 정렬됩니다. 예를 들어 순열 (2,3,1)을 l = (a,b,c)yields에 적용합니다 …
17 code-golf  combinatorics  permutations  code-golf  image-processing  brainfuck  encode  steganography  code-golf  ascii-art  code-golf  ascii-art  kolmogorov-complexity  code-golf  ascii-art  fibonacci  code-golf  string  code-golf  sorting  popularity-contest  statistics  code-golf  ascii-art  kolmogorov-complexity  code-golf  code-golf  ascii-art  tic-tac-toe  code-golf  string  code-challenge  classification  test-battery  binary-matrix  code-golf  math  arithmetic  code-golf  ascii-art  random  code-golf  string  code-golf  number  binary  bitwise  code-golf  number  arithmetic  code-golf  math  ascii-art  code-golf  string  ascii-art  code-golf  string  ascii-art  code-golf  string  code-golf  counting  code-golf  number  binary  bitwise  decision-problem  code-golf  array-manipulation  code-golf  tips  brain-flak  code-challenge  quine  source-layout  code-generation  code-golf  linear-algebra  matrix  abstract-algebra  binary-matrix  code-golf  string  palindrome  code-golf  puzzle-solver  sudoku  code-golf  ascii-art  code-golf  graphical-output  internet  code-golf  ascii-art  kolmogorov-complexity  code-golf  math  code-golf  clock 

12
워즈 모니터
도전 나는 최근 8 비트 컴퓨터에 들어갔고 그들과 다른 사람들의 작업에 매료되었다. 따라서이 코드 골프의 목표는 Steve Wozniak가 Apple I 용으로 디자인 한 Woz Monitor의 일부를 복제하는 것입니다. 너비가 2 바이트 (최소값 $ 10 , 최대 값 $ FF ) 인 22 개의 16 진 값 배열을 저장 한 다음 …

12
샤미르의 비밀 나눔
주어진 n(플레이어 수), t(임계 값) 및 s(비밀) n은 Shamir의 비밀 공유 알고리즘에 의해 생성 된 비밀을 출력합니다 . 알고리즘 이 도전의 목적을 위해, 계산은 GF (251) (크기의 유한 필드 251, 그렇지 않으면 정수 mod 251 로 알려진 ) 에서 수행 될 것이다 . 일반적으로 필드의 크기가보다 큰 소수를 갖도록 선택 …
17 code-golf  number-theory  random  cryptography  polynomials  code-golf  number  code-golf  math  number  sequence  code-golf  quine  code-generation  code-golf  arithmetic  set-theory  code-golf  sequence  code-golf  code-golf  string  math  fastest-code  optimization  code-golf  code-golf  internet  stack-exchange-api  code-golf  array-manipulation  code-golf  string  internet  string  code-challenge  internet  test-battery  code-golf  math  pi  code-golf  arithmetic  primes  code-golf  array-manipulation  code-golf  string  code-golf  string  palindrome  code-golf  sequence  number-theory  fastest-algorithm  code-golf  math  number  base-conversion  code-golf  number-theory  sorting  subsequence  search  code-golf  permutations  code-challenge  popularity-contest  code-generation 

22
뚜렷한 체
정수 목록이 제공되면 실제 인덱스를 사용하여 목록에서 고유 한 값을 필터링 할 수 있도록 부울 마스크를 작성하십시오. 동일한 값에 해당하는 각 인덱스 세트에 대해 하나만 선택하기 만하면 어느 인덱스가 참 인덱스로 선택되는지는 중요하지 않습니다. 입력은 사용자 언어에 적합한 형식으로 비어 있지 않은 음이 아닌 정수의 목록이되고 출력은 위의 스펙에 따른 …

8
지진 분석
배경 랜덤 도미노 오토 마톤 셀룰러 오토마타에서 영감 지진 장난감 모델이다. 이 과제에서이 모델의 단순화 된 버전을 시뮬레이션하고 해당 모델에서 데이터를 수집해야합니다. 오토 마톤은 비트 배열 A로 정의 k되며 지진이 발생할 수있는 결함 라인을 나타냅니다. 배열은 경계를 둘러 쌉니다. 조건의 A[i] = 0위치가 있음을 의미 i한다 완화 및 A[i] = …

당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.