Gelöst


Chess probability
The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...

12 Monate vor

Gelöst


Chess ELO rating system
The Elo rating system is a method for calculating the relative chess skill levels of players in competitor-versus-competitor gam...

12 Monate vor

Gelöst


Pentago: find winning move
<http://en.wikipedia.org/wiki/Pentago Pentago> is a challenging two-player strategy game. The objective is to be the first playe...

12 Monate vor

Gelöst


Game of Nim
The Game of Nim is a famous studied 2 player strategy game. <http://en.wikipedia.org/wiki/Nim> There are 3 heaps, and you...

12 Monate vor

Gelöst


RISK board game battle simulation
Given two positive integer inputs, a (attacker army units) and d (defender army units) return the probablity of victory (from 0....

12 Monate vor

Gelöst


RISK Calculator - Large Armies, High Accuracy, Fast
This Challenge is to quickly provide the high precision probability of legal RISK battles up to 100 vs 100. [ Attack >= 2 and D...

12 Monate vor

Gelöst


Wheat on a chessboard pt 2
If a chessboard were to have wheat placed upon each square such that x grains were placed on the first square and each successiv...

12 Monate vor

Gelöst


hanoi towers II
with 3 rods (1,2 & 3), the goal is to move a tower of n disks from rod #1 to rod #3. You can move disks only one by one, on the...

12 Monate vor

Gelöst


With apologies to William Blake
Coder Coder, typing fast Sitting at your desk, aghast. What immortal MATLAB script will solve this problem, nice and qu...

12 Monate vor

Gelöst


Packing oranges - one layer
Help the seller to pack oranges efficiently. How many oranges can be put into a box in one layer without squeezing them? Give...

12 Monate vor

Gelöst


Break it up! Break it up!
You have N pennies. Write a Matlab script that will reveal how many different ways you can break up those pennies. For example...

12 Monate vor

Gelöst


Number of cyles and fixed points in a permutation
A permutation can be constructed from one or more sets of elements in cyclic order. A permutation in a single row vector form ...

12 Monate vor

Gelöst


Find the path through the cell
A list of cells is given. Return true if the elements of the list increase monotonically (each element is strictly larger tha...

12 Monate vor

Gelöst


Project Euler: Problem 18, Maximum path sum I
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bott...

12 Monate vor

Gelöst


Yet Another Path Finder
Assume there is a rectangular grid of points. These points are indicated by linear indices in a MATLAB-fashion. Some of the grid...

12 Monate vor

Gelöst


possible ways through matrix
This problem is inspired from problem 2405 <https://www.mathworks.com/matlabcentral/cody/problems/2405-the-number-of-ways>. Che...

12 Monate vor

Gelöst


The Number of Ways
Find all the possible ways to reach the end of a matrix. So given [a b c d] the possible ways [a c],[a d],[b c],[b ...

12 Monate vor

Gelöst


How many rectangles in a grid ?
How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

12 Monate vor

Gelöst


Path of least resistance - Move all direction
Extension of the wonderful Problem 1049 (Path of Least Resistance). A matrix is given as input. You have to take a tour startin...

12 Monate vor

Gelöst


Number of paths on a 3d grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid>, which you mi...

12 Monate vor

Gelöst


Number of paths on a n-dimensional grid
This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid> and <https:/...

12 Monate vor

Gelöst


Path of least resistance
Find the length of the shortest path through the matrix from the top left to bottom right corner. You may move right, down, or d...

12 Monate vor

Gelöst


文字列の最初と最後の文字だけ抜き出しましょう。
文字列の最初と最後の文字をつなげて返すような関数を作成しましょう。 もし文字が一つしかない場合、その文字は最初と最後の文字のため、関数はその文字を二回返すようにしておきましょう。 例: stringfirstandlast('borin...

12 Monate vor

Gelöst


対称で、n*2n のサイズの行列を作成しましょう
サイズが n*2n の "mirror" 行列(対称行列)を作成しましょう。 例: n=2 の場合、以下のような出力を返します。 m = [ 1 2 2 1 1 2 2 1 ] n = 3 の場合、以下のよう...

12 Monate vor

Gelöst


英語の文章内の母音を取り除くコードを書きましょう。
与えられた英語の文章内の母音を取り除きましょう。 例: 入力 s1 が 'Jack and Jill went up the hill' の場合、 出力 s2 は 'Jck nd Jll wnt p th hll' * (英語版) ...

12 Monate vor

Gelöst


テレビのサイズを求めてみよう
あなたは電気屋で働いています。 あなたの電気屋にテレビを買いに来たお客さんに「何インチのテレビを買いたいのか」と質問したところ、対角線の情報しかわからないと言われてしまいました。 しかし、テレビのインチを知るには、幅と高さの情報が必要です。 ...

12 Monate vor

Gelöst


特定の値がベクトル内に含まれているかを確認するコードを書こう
ベクトル b にあるスカラ値 a が含まれていれば出力として 1 を返し、含まれていなければ 0 を返すような関数を作成しましょう。 例: a = 3; b = [1,2,4]; スカラ値 3 はベクトル b に含まれていない...

12 Monate vor

Gelöst


NaN (欠損値) が含まれている行を削除しよう
行列 A が与えられたとき、その行列の中に NaN (Not a number; 欠損値) の要素がある行を見つけ出し、その行を削除しましょう。 例: A = [ 1 5 8 -3 NaN 14 ...

12 Monate vor

Gelöst


二乗になっている数を見つけよう
ある数のベクトルが与えられた場合、そのベクトルの要素の一つが他の要素の二乗であれば true を返し、それ以外の場合は false を返すようなコードを書いてみましょう。 例: 入力が a = [2 3 4] のとき、 出力 b は t...

12 Monate vor

Gelöst


二つのベクトルの要素ごとの積の平均を計算しよう
二つの同じ長さのベクトルが与えられたとき、二つのベクトルの要素ごとの積の平均を求めましょう。 例: 二つのベクトル [1 2 3] と [10 15 20] が与えられたとき、 それぞれの要素ごとの積の平均を取ると、 解は 33.3333 と...

12 Monate vor

Mehr laden