Cody

Problem 42290. GJam 2015 Rd1B: Noisy Neighbors

Solution 2964568

Submitted on 18 Sep 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
m=zeros(5,2);N=8; NNexp=7; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

2   Fail
m=zeros(3,5);N=14; NNexp=18; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

3   Fail
m=zeros(1,16);N=1; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

4   Fail
m=zeros(3,5);N=1; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

5   Fail
m=zeros(8,2);N=12; NNexp=10; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

6   Fail
m=zeros(16,1);N=1; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

7   Fail
m=zeros(3,3);N=6; NNexp=3; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

8   Fail
m=zeros(2,6);N=12; NNexp=16; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

9   Fail
m=zeros(15,1);N=0; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

10   Fail
m=zeros(5,3);N=7; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

11   Fail
m=zeros(4,3);N=5; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

12   Fail
m=zeros(3,5);N=11; NNexp=8; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

13   Fail
m=zeros(7,2);N=13; NNexp=16; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

14   Fail
m=zeros(15,1);N=6; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

15   Fail
m=zeros(15,1);N=15; NNexp=14; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

16   Fail
m=zeros(4,4);N=9; NNexp=2; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

17   Fail
m=zeros(5,3);N=8; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

18   Fail
m=zeros(3,5);N=6; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

19   Fail
m=zeros(16,1);N=7; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

20   Fail
m=zeros(1,15);N=7; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

21   Fail
m=zeros(4,3);N=12; NNexp=17; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

22   Fail
m=zeros(5,3);N=13; NNexp=14; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

23   Fail
m=zeros(2,4);N=5; NNexp=2; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

24   Fail
m=zeros(5,3);N=5; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

25   Fail
m=zeros(16,1);N=16; NNexp=15; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

26   Fail
m=zeros(2,5);N=8; NNexp=7; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

27   Fail
m=zeros(5,3);N=4; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

28   Fail
m=zeros(5,3);N=10; NNexp=6; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

29   Fail
m=zeros(4,4);N=7; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

30   Fail
m=zeros(3,5);N=9; NNexp=3; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

31   Fail
m=zeros(4,2);N=2; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

32   Fail
m=zeros(4,4);N=15; NNexp=20; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

33   Fail
m=zeros(2,2);N=4; NNexp=4; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

34   Fail
m=zeros(5,3);N=11; NNexp=8; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

35   Fail
m=zeros(4,4);N=8; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

36   Fail
m=zeros(1,16);N=9; NNexp=1; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

37   Fail
m=zeros(4,4);N=16; NNexp=24; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

38   Fail
m=zeros(1,15);N=6; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

39   Fail
m=zeros(15,1);N=8; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

40   Fail
m=zeros(5,3);N=6; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

41   Fail
m=zeros(16,1);N=9; NNexp=1; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

42   Fail
m=zeros(3,5);N=15; NNexp=22; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

43   Fail
m=zeros(1,15);N=1; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

44   Fail
m=zeros(1,15);N=0; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

45   Fail
m=zeros(2,5);N=9; NNexp=10; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

46   Fail
m=zeros(3,5);N=10; NNexp=6; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

47   Fail
m=zeros(1,15);N=15; NNexp=14; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

48   Fail
m=zeros(3,2);N=0; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

49   Fail
m=zeros(5,3);N=2; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

50   Fail
m=zeros(5,3);N=1; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

51   Fail
m=zeros(5,2);N=4; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

52   Fail
m=zeros(3,5);N=4; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

53   Fail
m=zeros(2,7);N=13; NNexp=16; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

54   Fail
m=zeros(3,3);N=0; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

55   Fail
m=zeros(7,2);N=11; NNexp=10; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

56   Fail
m=zeros(4,4);N=0; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

57   Fail
m=zeros(1,1);N=0; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

58   Fail
m=zeros(2,6);N=9; NNexp=7; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

59   Fail
m=zeros(3,5);N=3; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

60   Fail
m=zeros(5,3);N=15; NNexp=22; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

61   Fail
m=zeros(5,2);N=6; NNexp=2; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

62   Fail
m=zeros(3,4);N=12; NNexp=17; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

63   Fail
m=zeros(2,3);N=6; NNexp=7; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

64   Fail
m=zeros(1,1);N=1; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

65   Fail
m=zeros(15,1);N=1; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

66   Fail
m=zeros(1,16);N=16; NNexp=15; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

67   Fail
m=zeros(2,2);N=2; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

68   Fail
m=zeros(3,3);N=9; NNexp=12; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

69   Fail
m=zeros(16,1);N=8; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

70   Fail
m=zeros(9,1);N=6; NNexp=2; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

71   Fail
m=zeros(5,3);N=12; NNexp=11; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

72   Fail
m=zeros(2,2);N=3; NNexp=2; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

73   Fail
m=zeros(3,5);N=7; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

74   Fail
m=zeros(7,2);N=0; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

75   Fail
m=zeros(4,3);N=6; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

76   Fail
m=zeros(2,3);N=4; NNexp=2; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

77   Fail
m=zeros(1,15);N=8; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

78   Fail
m=zeros(16,1);N=0; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

79   Fail
m=zeros(5,3);N=9; NNexp=3; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

80   Fail
m=zeros(15,1);N=7; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

81   Fail
m=zeros(2,4);N=6; NNexp=4; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

82   Fail
m=zeros(1,16);N=7; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

83   Fail
m=zeros(3,5);N=12; NNexp=11; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

84   Fail
m=zeros(1,16);N=8; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

85   Fail
m=zeros(4,4);N=1; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

86   Fail
m=zeros(3,5);N=0; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

87   Fail
m=zeros(3,5);N=8; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

88   Fail
m=zeros(1,16);N=0; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

89   Fail
m=zeros(5,3);N=3; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

90   Fail
m=zeros(5,3);N=0; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

91   Fail
m=zeros(1,13);N=9; NNexp=4; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

92   Fail
m=zeros(3,5);N=2; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

93   Fail
m=zeros(1,9);N=6; NNexp=2; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

94   Fail
m=zeros(6,2);N=12; NNexp=16; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

95   Fail
m=zeros(4,3);N=8; NNexp=4; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

96   Fail
m=zeros(3,5);N=5; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

97   Fail
m=zeros(5,3);N=14; NNexp=18; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

98   Fail
m=zeros(4,3);N=7; NNexp=2; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

99   Fail
m=zeros(6,2);N=4; NNexp=0; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

100   Fail
m=zeros(3,5);N=13; NNexp=14; NN=Noisy_Neighbors(m,N); assert(isequal(NNexp,NN))

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

101   Fail
toc

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

102   Fail
% function GJam_Rd1B_2015b % fn='B-small-practice.in'; % [data] = read_file(fn); % % fidG = fopen('B-small-practice.out', 'w'); % % tic % for i=1:size(data,2) % Cell array has N cols of cases % NN = Noisy_Neighbors(data{i}); % fprintf(fidG,'Case #%i: %i\n',i,NN); % % fprintf('Case #%i: %i\n',i,NN); % end % toc % fclose(fidG); % end % % function val=Noisy_Neighbors(v) % r=v(1);c=v(2);N=v(3); % m=zeros(r,c); % if N==0 % val=0; % return; % end % % ptrset=find(m==0); % % val=Inf; % tlocs=nchoosek(ptrset,N); % for i=1:size(tlocs,1) % m=m*0; % tlocv=tlocs(i,:); % m(tlocv)=1; % vchk=nnz(conv2(m,[1 1])==2)+nnz(conv2(m,[1;1])==2); % % if vchk<val % val=vchk; % end % if val==0,break;end; % end % % end % % function [d] = read_file(fn) % d={}; % fid=fopen(fn); % fgetl(fid); % Total Count ignore % ptr=0; % while ~feof(fid) % ptr=ptr+1; % v=str2num(fgetl(fid)); % r,c,N % % d{ptr}=v; % % end % feof % fclose(fid); % % end % read_file

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

103   Fail
toc

Error in solution: Line: 7 Column: 49 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.