«array-manipulation» 태그된 질문

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

4
Getters 받기
작업 모두가 자동 코드 생성을 좋아하고 작업하는 동안 시간을 ​​절약한다고 생각합니다. 낮에는 많은 클래스와 멤버를 만들어야하며 모든 클래스와 멤버를 getters수동으로 만들고 싶지는 않습니다 . 작업은 getters모든 클래스 멤버를 위해 자동으로 생성되는 프로그램 또는 함수를 작성하는 것입니다. 입력 우리의 언어에서 객체는 매우 간단합니다. 클래스와 멤버의 이름은 [a-zA-Z]문자로 시작해야 하며 문자 만 …
13 code-golf  string  syntax  code-golf  math  primes  rational-numbers  code-golf  graphical-output  image-processing  code-golf  kolmogorov-complexity  music  audio  code-golf  string  code-golf  math  geometry  code-golf  math  sequence  combinatorics  code-golf  game  grid  board-game  code-golf  restricted-source  array-manipulation  source-layout  code-golf  base-conversion  binary  code-golf  math  physics  code-golf  math  number  date  expression-building  code-golf  array-manipulation  graph-theory  decision-problem  popularity-contest  error-correction  code-golf  kolmogorov-complexity  geometry  grid  code-challenge  arithmetic  combinatorics  set-partitions  code-golf  kolmogorov-complexity  sequence  fibonacci  code-golf  restricted-source  pristine-programming  code-golf  code-golf  string  kolmogorov-complexity  code-golf  arithmetic  code-golf  string  parsing  code-golf  code-golf  sorting  counting  permutations  3d  code-golf  code-golf  ascii-art  music  code-golf  string  code-golf  string  ascii-art  code-golf  string  code-golf  quine  polyglot  code-golf  math  string  code-golf  internet 

3
Brainfuck의 비트 연산자
당신의 임무는 다음 각 이진 연산자 각각에 대해 하나의 brainfuck 프로그램을 만드는 것입니다. 각 프로그램은 입력에서 하나 또는 두 개의 8 비트 숫자 (A 및 B)를 가져 와서 지정된 연산을 계산해야합니다. A XOR B A AND B A OR B A Shifted Left by 1 (circular shift) NOT A 5를 …
13 code-golf  binary  brainfuck  code-golf  code-golf  ascii-art  random  code-golf  code-golf  code-challenge  sorting  code-golf  code-challenge  java  code-golf  statistics  code-golf  code-challenge  fastest-code  code-golf  math  code-golf  math  kolmogorov-complexity  code-golf  code-golf  array-manipulation  combinatorics  code-golf  kolmogorov-complexity  popularity-contest  underhanded  code-golf  math  floating-point  code-golf  interpreter  code-golf  music  code-golf  code-golf  cryptography  code-challenge  scrabble  code-golf  code-challenge  popularity-contest  quine  code-golf  quine  cryptography  code-golf  kolmogorov-complexity  code-golf  printable-ascii  code-golf  chess  code-golf  math  number-theory  code-challenge  c  code-golf  random  popularity-contest  hello-world  code-shuffleboard  code-golf  compression  grammars  code-golf  tips  code-golf  sequence  code-golf  string  code-challenge  sorting  permutations  code-golf  string  code-challenge  optimization  code-golf  interpreter  code-challenge  string  code-golf  math  number  fibonacci  string  compression  c#  code-golf  chemistry  popularity-contest  math  c  c++  java  code-golf  math  function  code-golf  complex-numbers  code-golf  geometry 

13
연속 된 부분 행렬 계산
채팅에서 이전 두 개의 비어 아닌 정수 행렬 주어 및 B는 , 횟수 응답 A가 A와 발생 인접 가능성 중첩 행렬 에 B를 . 예 / 규칙 0. 하위 행렬이 없을 수 있습니다 A : [[3,1], [1,4]] B : [[1,4], [3,1]] 대답: 0 1. 하위 행렬은 연속적이어야합니다 A : [[1,4], …

6
가장 넓은 계곡 결정
우리가 산악 지역의 한 조각을 얻는다고 상상해보십시오. 이렇게하면 비슷한 모양이됩니다. 4 _ 3 _ _ __/ \ 2 / \__/ \ _/ \_ / 1 / \ / \_/ 0 \/ 12322223210012233343221112 우리가 볼 수 있듯이, 우리는 이것을 어느 정도의 정수로 나타낼 수 있습니다. 이 도전의 목적을 위해 계곡은 값이 …


3
내 Nullifiers 최적화
나는 게임 크리퍼 월드, 특히 속편의 큰 팬입니다. 이 게임이 질문에 대답하기 위해 어떻게 작동하는지 알 필요는 없습니다. 나는 단지 질문이 어디에서 시작되었는지 언급하고 싶었습니다. 게임에서 당신의 목표는 무기로 알려진 무기를 사용하여 크리퍼를 생성하는 이미 터를 파괴하는 것입니다. Nullifier는이 반경에서 이미 터를 파괴 할 수 있습니다. eee eeeee eenee eeeee …

15
대체 숫자
양의 정수 배열을 고려하십시오. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ... 그런 다음 연결하십시오. 1234567891011121314151617181920212223242526... 그런 다음 그것들을 가변 길이의 덩어리로 나눕니다. 각 길이는 N 번째 양의 정수와 같습니다. [1][23][456][7891][01112][131415][1617181][92021222][324252627][2829303132] ... --------------------------------------------------------------------------- 1 2 3 4 5 6 7 8 9 10 ... …

13
개구리처럼 건너 뛰세요!
음이 아닌 정수 배열이 주어지면 아래 설명과 같이 특정 요소 만 유지해야합니다. 배열이라고 가정 해 봅시다 [1, 3, 2, 4, 11, 5, 2, 0, 13, 10, 1]. 먼저 배열의 첫 번째 요소를 얻습니다 n. 첫 번째 n요소를 유지하고 다음 요소를 버립니다 ( 일차 폐기 n+1). 새로운 배열은 [1, 2, 4, …

6
합리적인 생성 함수의 계수 찾기
일련의 숫자를 거듭 제곱의 계수로 쓰면, 그 거듭 제곱 을 해당 순서 의 (일반) 생성 함수 (또는 Gf)라고합니다. 즉, 함수 F(x)와 일련의 정수에 a(n)대해 다음과 같은 경우 a(0) + a(1)x + a(2)x^2 + a(3)x^3 + a(4)x^4 + ... = F(x) 그런 다음 F(x)의 생성 함수입니다 a. 예를 들어, 기하학적 시리즈 …
12 code-golf  math  integer  polynomials  code-golf  math  abstract-algebra  restricted-time  code-golf  math  primes  code-golf  math  number  arithmetic  code-golf  quine  code-golf  number  sequence  code-golf  string  number  code-golf  array-manipulation  code-golf  number  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 

11
목록 목록을 Sad-List로 구문 분석
이 문제에서는 목록 목록을 더 간단한 목록 형식으로 구문 분석해야합니다. 이 도전은 내 슬픈 깃발 파서를 기반으로합니다. 내 sadflak 파서에서는 프로그램 시작 속도를 높이기 위해 모든 ()을 제거하고 목록 시작 부분에서 ()의 합계로 바꿨습니다. Sad-List로 파싱하려면 다음을 수행해야합니다 (파이썬 구현, 튜플 튜플 사용). def sadlistfunc(list): new-sadlist = [0] for i …

14
파일을 0으로 채 웁니다
오늘해야 할 일은 기존 파일을 가져 와서 특정 크기에 도달 할 때까지 0을 추가하는 것입니다. 현재 디렉토리의 파일 이름 f과 바이트 수를 사용 하는 프로그램이나 함수를 작성해야합니다 b. 의 원래 내용을 유지하면서 새 크기가 바이트 가되도록 끝에 f0을 입력해야합니다 (아스키 0이 아닌 null 바이트)b . 당신은 가정 수 f는 처음보다 …
12 code-golf  file-system  code-golf  code-golf  string  code-golf  string  code-golf  random  game  compression  code-golf  array-manipulation  sorting  code-golf  number  arithmetic  primes  code-golf  geometry  code-golf  code-golf  decision-problem  regular-expression  code-golf  string  math  code-challenge  restricted-source  integer  palindrome  code-golf  string  palindrome  code-challenge  busy-beaver  code-golf  ascii-art  code-golf  string  code-golf  string  permutations  code-golf  code-golf  string  permutations  code-golf  number  primes  function  set-theory  code-challenge  hello-world  code-golf  math  number  decision-problem  code-golf  code-golf  sequence  arithmetic  integer  code-golf  math  number  arithmetic  decision-problem  code-golf  kolmogorov-complexity  alphabet  code-golf  combinatorics  graph-theory  tree-traversal  code-golf  set-theory  code-golf  interpreter  brainfuck  substitution  code-golf  quine  permutations 

6
샌드 파일 토플
(관련에 대한 질문이 있습니다 무한 sandpiles 및 sandpiles의 발견 정체성 요소 .) 음이 아닌 정수의 행렬이 주어지면 동일한 차원이지만 행렬이 뒤집힌 행렬을 반환합니다 . 행렬에 4보다 큰 값이 포함되어 있지 않으면 반환하십시오. 3보다 큰 모든 "셀"은 4 씩 감소하며, 직접 인접한 모든 셀 (위, 아래, 왼쪽 및 오른쪽)은 존재하는 경우 …

1
이 세포들을 그룹화하십시오!
이 도전은 게임 Layerz를 기반으로합니다 . stdin 또는 함수 인수로 각 셀에 공백이 포함 된 2D 직사각형 셀 배열 (벌금없이 공백 대신 0을 사용하도록 선택할 수 있음), 1, a 2, 3 또는 4 ; 공백이 아닌 각 셀이 정확히 하나의 영역에 포함되도록 유효한 영역으로 나누는 방법을 찾으십시오 (아래 정의 참조). …

30
목록의 "포장되지 않은 크기"찾기
다음 규칙에 따라 u중첩 목록 l( 목록 만 포함) 의 "포장 해제 된 크기"기능 을 정의 해 보겠습니다 . l비어 있으면 u(l)1입니다. l비어 있지 않은 경우 u(l)의 모든 요소에 래핑되지 않은 크기의 합에 l1을 더한 값과 같습니다. 당신의 임무는리스트를 입력으로 취하고리스트의 랩핑되지 않은 크기를 출력 (또는 리턴)하는 프로그램 (또는 함수)을 …

30
문자열의 누적 경사를 출력
도전 과 같은 문자열 Hello World!이 있으면 문자 값으로 세분화하십시오 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33. 그런 다음 각 연속 문자 쌍의 차이를 계산하십시오 29, 7, 0, 3, -79, 55, 24, 3, -6, -8, -67. 마지막으로 그것들을 합산하고 최종 결과를 인쇄하십시오 -39. 규칙 표준 …

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