Resuelto


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/...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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....

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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 ...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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

10 meses hace

Resuelto


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 ...

10 meses hace

Resuelto


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.

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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:/...

10 meses hace

Resuelto


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...

10 meses hace

Resuelto


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

10 meses hace

Resuelto


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

10 meses hace

Resuelto


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

10 meses hace

Resuelto


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

10 meses hace

Resuelto


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

10 meses hace

Resuelto


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

10 meses hace

Resuelto


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

10 meses hace

Resuelto


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

10 meses hace

Cargar más