«array-manipulation» 태그된 질문

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

15
모듈로 패리티 파티
넌 배열 주어진다 을 들 N 과 엄격히 양의 정수 , N ≥ 2 . 당신의 임무는 각 항목 A i 를 다음 에 매핑 하는 것입니다. 한 경우 J 개조 난 각 홀수 J 되도록 1 ≤ N ≤ J 및 J ≠ 난 두 경우 J 개조 나 …

17
XOR 배열 정렬
키와 문자열 배열이 주어지면 각 요소가 키와 XOR 될 때 정렬되도록 배열을 섞습니다. 두 줄 XOR 키를 사용하여 문자열을 XOR하려면 키가 영원히 반복된다고 가정하고 문자열의 각 문자 값을 키의 쌍으로 XOR하십시오. 예를 들면 abcde^123다음과 같습니다. a b c d e 1 2 3 1 2 -------------------------------------------- 01100001 01100010 01100011 01100100 …

7
진동 평등
on [l, r]에서 시작하여 시간 단위당 하나의 단위 속도로 두 개의 정수 포인트 사이에서 진동하는 객체가 있습니다. 당신은 가정 할 수 있습니다 . 예를 들어 객체가 진동 하면 다음과 같은 결과가 나타납니다.lt=0l < r[3, 6] t=0 -> 3 t=1 -> 4 t=2 -> 5 t=3 -> 6 t=4 -> 5 …
15 code-golf  array-manipulation  decision-problem  code-golf  math  number-theory  palindrome  integer-partitions  code-golf  math  decision-problem  geometry  code-golf  string  random  code-golf  ascii-art  code-golf  kolmogorov-complexity  primes  code-golf  kolmogorov-complexity  code-golf  graphical-output  code-golf  number-theory  primes  integer  factoring  code-golf  sequence  array-manipulation  integer  code-golf  array-manipulation  matrix  code-golf  sequence  binary  code-golf  game  cellular-automata  game-of-life  binary-matrix  code-golf  string  ascii-art  code-golf  random  generation  logic  code-golf  string  code-golf  code-golf  sequence  array-manipulation  random  apl  code-golf  code-golf  sequence  primes  code-golf  math  sequence  integer  code-golf  number  arithmetic  array-manipulation  decision-problem  code-golf  ascii-art  number  code-golf  restricted-source  quine  code-golf  chess  board-game  code-golf  math  sequence  code-golf  number  sequence  kolmogorov-complexity  code-golf  number  sequence  arithmetic  code-golf  math  number  alphabet  code-golf  ascii-art  classification  statistics  apl  code-golf  array-manipulation  matrix  code-golf  string  kolmogorov-complexity  code-golf  sequence  binary  base-conversion  binary-matrix  code-golf  string  classification  code-golf  tips  python  code-golf  combinatorics  binary  subsequence  restricted-time  code-golf  number  number-theory  code-golf  math  number  complex-numbers  code-golf  string  code-golf  string  code-golf  string  random  game  king-of-the-hill  python  code-golf  number  sequence  code-golf  number  sequence  code-golf  code-golf  math  number  array-manipulation  code-golf  array-manipulation  decision-problem  code-golf  string  code-golf  sequence  integer 

19
자기애 배열 요소
정의 배열의 자기애 적 정수 1 은 자신의 산술 평균보다 엄격하기 때문에 이웃보다 낫다고 생각합니다. 이웃은 다음과 같이 정의됩니다. 정수가 인덱스 0 (첫 번째) 인 경우, 이웃은 목록의 마지막 요소와 두 번째 요소입니다. 정수가 첫 번째도 아니고 마지막도 아닌 경우, 이웃은 바로 인접한 두 요소입니다. 정수가 인덱스 -1 (마지막)이면 이웃은 …

9
L €€ CH € $! D € AṬH ỊṢ ṢOOṄ! (길이 매핑)
제목은 L€€두 번 인쇄 된 것을 제외하고 동일한 출력을 갖는 유효한 Jelly Code입니다 . 배경 챌린지를 완료하는 능력을 잃지 않고이 섹션을 건너 뛸 수 있습니다 Jelly의 일부 작업은 작업을 적용하기 전에 먼저 인수를 목록으로 변환하려고합니다. 한 가지 예는 €매핑이 빠릅니다. 이것은 때때로 의도하지 않은 출력으로 이어집니다. 프로그램 L€및 입력 5의 …


24
의사 요소를 필터링하십시오!
우리는 정의 하이퍼 평균 (숫자) 배열 / 목록의 접두사의 합계의 산술 평균을. 예를 들어, 목록의 하이퍼 평균은 [1, 4, -3, 10]다음과 같은 방식으로 계산됩니다. 우리는 접두사를 얻는다 : [1], [1, 4], [1, 4, -3], [1, 4, -3, 10]. 각각을 요약하십시오 : [1, 5, 2, 12]. 이제이 목록에있는 요소의 산술 평균을 …

4
PPCG Claus가 선물을 전달하도록 도와주세요!
PPCG Claus가 선물을 전달할 수 있도록 도와주세요 개요 PPCG Claus는 요즘 선물을 전달하는 데 늦었습니다. 요즘 우리에게는 많은 이상한 꼬마들이 있기 때문입니다. 이로 인해 PPCG Claus가 모든 선물을 정확한 장소에 가져 오기가 훨씬 어렵습니다. 당신의 도전은 그가 선물을 올바르게 전달하도록 돕는 것입니다. 복잡성 배달 할 아이들을 나타내는 대문자로 된 이름 …



1
루핑 배열 생성
소개 포인터 배열은 배열 인 L제로가 아닌 정수의 0 ≤ L[i]+i < len(L)모든 인덱스에 대한 보유 i(0 기반 인덱스를 가정). 우리는 인덱스가 있다고 i 지적 인덱스에 L[i]+i. 인덱스가 길이의 단일주기를 형성하는 경우 포인터 배열은 루프len(L) 입니다. 여기 몇 가지 예가 있어요. [1,2,-1,3]는 3인덱스를 가리 키지 않기 때문에 포인터 배열 이 …

4
행렬의 모든 행과 열을 회전
도전 주어진 n x n정수 행렬n >= 2 1 2 3 4 정확히 2n요소 가있는 정수 목록 [1,2, -3, -1] 회전 된 행렬을 출력합니다. 이 매트릭스는 다음과 같은 방식으로 구성됩니다. 목록에서 첫 번째 정수를 가져 와서이 값만큼 첫 번째 행을 오른쪽으로 회전하십시오. 다음 정수를 가져 와서 첫 번째 열을이 값만큼 …

18
직사각형 행렬 정렬
행렬이 주어지면 A각 행과 열 A이 정렬 되면 행 이 왼쪽에서 오른쪽으로 오름차순으로 정렬 되고 열의 경우 위에서 아래로 오름차순으로 정렬된다고 말할 수 있습니다 . 따라서이 행렬은 다음과 같이 정렬됩니다. [ 1 2 3 4 5 ] [ 2 2 3 4 5 ] [ 3 3 3 4 5 …

17
키르히 호프의 법칙 적용
Kirchhoff의 법칙에 따르면 모든 전류를 합산하면 (접합으로가는 전류에 대해 양수이고, 접합에서 나가는 전류에 대해서는 음수) 항상 0으로 표시됩니다. 다음 다이어그램을보십시오. Kirchhoff의 법칙을 사용하면 i1 + i4-i2-i3 = 0이므로 i1 + i4 = i2 + i3임을 알 수 있습니다. 하나의 접점에 모든 전류가 있고 하나의 접점을 제외한 모든 전류가 접점을 떠나는 …

3
스택 기반 언어 토큰 화
나는 작업을했습니다 다른 호출 스택 기반의 골프 언어 Stackgoat . 이 과제에서는 Stackgoat (또는 실제로는 일반적인 스택 기반 언어) 용 Tokenizer를 작성하게됩니다. 예 "PPCG"23+ ["PPCG", '23', '+'] 'a "bc" + ['"a"', '"bc"', '+'] 12 34+-"abc\"de'fg\\" ['12', '34', '+', '-', '"abc\"de'fg\\"'] "foo ['"foo"'] (empty input) [] ' "" ['" "', '""'] …
15 code-golf  parsing  code-golf  hexagonal-grid  code-golf  string  code-golf  string  code-golf  combinatorics  code-golf  ascii-art  code-golf  string  game  counting  code-golf  arithmetic  complex-numbers  code-golf  string  code-golf  decision-problem  hexagonal-grid  code-golf  string  sequence  code-golf  number  arithmetic  code-golf  ascii-art  code-golf  ascii-art  code-golf  string  arithmetic  code-golf  number  simulation  code-golf  number  arithmetic  code-golf  string  sequence  unicode  code-golf  string  ascii-art  balanced-string  code-golf  number  clock  code-golf  ascii-art  number  code-golf  math  number  sequence  code-golf  string  ascii-art  balanced-string  code-golf  math  string  popularity-contest  graphical-output  image-processing  code-golf  string  permutations  code-golf  string  code-golf  random  code-golf  string  cryptography  palindrome  code-golf  chess  code-golf  math  array-manipulation  topology  code-golf  math  sequence  code-golf  keyboard  classification  code-golf  string  sequence  code-golf  natural-language  code-golf  math  number  sequence  sorting  code-golf  sequence  combinatorics  grid  tic-tac-toe  code-golf  geometry  code-golf  number  restricted-source  new-years  expression-building 

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