Cody

# Problem 3057. Chess performance

Solution 2262832

Submitted on 7 May 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Fail
playera=1613; elos=[1609 1477 1388 1586 1720]; res=[0 0.5 1 1 0]; assert(isequal(new_elo(elos,res,playera),1601))

a = 0 y = -0.3670 y = 1.6013e+03

Assertion failed.

2   Fail
playera=1613; elos=[1609 1477 1586 1720]; res=[0 1 1 1]; assert(isequal(new_elo(elos,res,playera),1642))

a = 0 y = 0.9180 y = 1.6424e+03

Assertion failed.

3   Pass
playera=1613; elos=[1613 1613 1613 1613 1613]; res=[0.5 0.5 0.5 0.5 0.5]; assert(isequal(new_elo(elos,res,playera),1613))

a = 0 y = 0 y = 1613

4   Fail
assert(isequal(new_elo([1800 1900 2000 2100 2200],[1 0 1 0 1],1900),1935))

a = 0 y = 1.1090 y = 1.9355e+03

Assertion failed.

5   Fail
playera=1800; elos=[1399 1280 2166 1534 1768 1791 1540]; res=[1 1 0 1 1 0 1]; assert(isequal(new_elo(elos,res,playera),1811))

a = 0 y = 0.3320 y = 1.8106e+03

Assertion failed.

6   Fail
playera=1800; elos=[1399 1280 2166 1534 1768 1791 1540]; res=[1 1 0 1 1 0 0]; assert(isequal(new_elo(elos,res,playera),1779))

a = 0 y = -0.6680 y = 1.7786e+03

Assertion failed.

7   Fail
playera=1800; elos=[1399 1280 2166 1534 1768 1791 1540]; res=[1 1 1 1 1 1 1]; assert(isequal(new_elo(elos,res,playera),1875))

a = 0 y = 2.3320 y = 1.8746e+03

Assertion failed.

8   Fail
caruana=2801; elos = [2772 2768 2877 2805 2787 2772 2768 2877 2787 2805]; res = [1 1 1 1 1 1 1 0.5 0.5 0.5]; assert(isequal(new_elo(elos,res,caruana),2913))

a = 0 y = 3.5100 y = 2.9133e+03

Assertion failed.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!