You are given an N × N matrix in which every cell is colored black or white. Columns are numbered from 0 to N-1 (from left to right). This coloring is represented by a non-empty array of integers A. If the K-th number in the array is equal to X then the X lowest cells in the K-th column of the matrix are black. The rest of the cells in the K-th column are white. The task is to calculate the side length of the biggest black square (a square containing only black cells).
Write a function:
class Solution { public int solution(int[] A); }
that, given an array of integers A of length N representing the coloring of the matrix, returns the side length of the biggest black square.
Examples:
1. Given A = [1, 2, 5, 3, 1, 3], the function should return 2. For example, the black square of side 2 contains the two lowest rows of the 1st and 2nd columns (counting from 0).
2. Given A = [3, 3, 3, 5, 4], the function should return 3. For example, the biggest black square has side 3 and contains the three lowest rows of the last three columns.
3. Given A = [6, 5, 5, 6, 2, 2], the function should return 4. The biggest black square has side 4 and contains the four lowest rows of the first four columns.
Write an efficient algorithm for the following assumptions:
- N is an integer within the range [1..100,000];
- each element of array A is an integer within the range [1..N].
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
ArrayList<int> rows = new
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
ArrayList<int> rows = new ArrayList<int>();
ArrayList<int> columns = new ArrayList<int>();
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
class Matrix {
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
class Matrix {
Matrix(int rows, int columns)
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
class Matrix {
///
Matrix(int rowCount, int columnCount)
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
class Matrix {
Matrix(int rowCount, int columnCount){
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
class Matrix {
Matrix(int rowCount, int columnCount){
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
class Matrix {
Matrix(int rowCount, int columnCount){
}
pulbic getCell(int rowNumber, int co)
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
class Matrix {
Matrix(int rowCount, int columnCount){
}
pulbic getCell(int rowNumber, int columnNumber){
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
class Matrix {
Matrix(int rowCount, int columnCount){
}
pulbic int getCell(int rowNumber, int columnNumber){
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
public class Matrix {
Matrix(int rowCount, int columnCount){
}
int getCell(int rowNumber, int columnNumber){
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
public class Matrix {
Matrix(int rowCount, int columnCount){
}
int getCell(int rowNumber, int columnNumber){
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
public class Matrix {
ArrayList<int> rows = new ArrayList<int>();
Matrix(int rowCount, int columnCount){
}
int getCell(int rowNumber, int columnNumber){
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// write your code in C# 6.0 with .NET 4.5 (Mono)
// Represent row of the matrix
ArrayList<int> rows = new ArrayList<int>();
// Represent row of the columns
ArrayList<int> columns = new ArrayList<int>();
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList<int,columns> rows = new ArrayList<int>();
Matrix(int rowCount, int columnCount){
}
int getCell(int rowNumber, int columnNumber){
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList<int,columns> rows = new ArrayList<int,columns>();
Matrix(int rowCount, int columnCount){
}
int getCell(int rowNumber, int columnNumber){
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList<int,columns> rows = new ArrayList<int,columns>();
Matrix(int rowCount, int columnCount){
}
int getCell(int rowNumber, int columnNumber){
ro
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList<int,columns> rows = new ArrayList<int,columns>();
Matrix(int rowCount, int columnCount){
}
int getCell(int rowNumber, int columnNumber){
rows.get
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList<int,columns> rows = new ArrayList<int,columns>();
Matrix(int rowCount, int columnCount){
}
int GetCell(int rowNumber, int columnNumber){
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList<int,columns> rows = new ArrayList<int,columns>();
Matrix(int rowCount, int columnCount){
}
int GetCell(int rowNumber, int columnNumber){
rows
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList<int,columns> rows = new ArrayList<int,columns>();
Matrix(int rowCount, int columnCount){
}
int GetCell(int rowNumber, int columnNumber){
rows.get()
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList<int,columns> rows = new ArrayList<int,columns>();
Matrix(int rowCount, int columnCount){
}
int GetCell(int rowNumber, int columnNumber){
rows.get()
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList<int,columns> rows = new ArrayList<int,columns>();
Matrix(int rowCount, int columnCount){
}
int GetCell(int rowNumber, int columnNumber){
try{
rows[rowNumber]
}catch(Exception ex){
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList<columns> rows = new ArrayList<columns>();
Matrix(int rowCount, int columnCount){
}
int GetCell(int rowNumber, int columnNumber){
try{
rows[rowNumber]
}catch(Exception ex){
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList<column rows = new ArrayList<columns>();
Matrix(int rowCount, int columnCount){
}
int GetCell(int rowNumber, int columnNumber){
try{
rows[rowNumber]
}catch(Exception ex){
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList rows = new ArrayList();
Matrix(int rowCount, int columnCount){
}
int GetCell(int rowNumber, int columnNumber){
try{
rows[rowNumber]
}catch(Exception ex){
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList rows = new ArrayList();
Matrix(int rowCount, int columnCount){
}
int GetCell(int rowNumber, int columnNumber){
try{
rows[rowNumber][columnNumber]
}catch(Exception ex){
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList rows = new ArrayList();
Matrix(int rowCount, int columnCount){
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList rows = new ArrayList();
Matrix(int rowCount, int columnCount){
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList rows = new ArrayList();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList rows = new ArrayList();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
this.rows.add
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList rows = new ArrayList();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
this.rows.Add()
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList< rows = new ArrayList();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
this.rows.Add()
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<int> columns = new ArrayList<int>();
ArrayList<ArrayList<int>> rows = new ArrayList();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
this.rows.Add()
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
this.rows.Add()
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
this.rows.Add()
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
this.rows.Add()
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
this.rows.Add()
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
}
this.rows.Add()
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
newColunmns.Add(0);
}
this.rows.Add()
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
M
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
System.
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
System.out.println()
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
System.out.println(FiveToFiveTimesMatrix.GetCell(0,0))
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
System.out.println(FiveToFiveTimesMatrix.GetCell(0,0))
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 7 error(s), 0 warnings Solution.cs(13,15): error CS1041: Identifier expected, `out' is a keyword Solution.cs(14,5): error CS1002: ; expected Solution.cs(21,36): error CS1525: Unexpected symbol `;', expecting `)', `,', or `}' Solution.cs(21,37): error CS1525: Unexpected symbol `)', expecting `)', `,', or `}' Solution.cs(25,43): error CS1525: Unexpected symbol `;', expecting `)', `,', or `}' Solution.cs(25,44): error CS1525: Unexpected symbol `)', expecting `)', `,', or `}' Solution.cs(30,9): error CS1002: ; expected
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
out.println(FiveToFiveTimesMatrix.GetCell(0,0))
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 7 error(s), 0 warnings Solution.cs(13,8): error CS1525: Unexpected symbol `out' Solution.cs(14,5): error CS1002: ; expected Solution.cs(21,36): error CS1525: Unexpected symbol `;', expecting `)', `,', or `}' Solution.cs(21,37): error CS1525: Unexpected symbol `)', expecting `)', `,', or `}' Solution.cs(25,43): error CS1525: Unexpected symbol `;', expecting `)', `,', or `}' Solution.cs(25,44): error CS1525: Unexpected symbol `)', expecting `)', `,', or `}' Solution.cs(30,9): error CS1002: ; expected
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0))
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 6 error(s), 0 warnings Solution.cs(14,5): error CS1002: ; expected Solution.cs(21,36): error CS1525: Unexpected symbol `;', expecting `)', `,', or `}' Solution.cs(21,37): error CS1525: Unexpected symbol `)', expecting `)', `,', or `}' Solution.cs(25,43): error CS1525: Unexpected symbol `;', expecting `)', `,', or `}' Solution.cs(25,44): error CS1525: Unexpected symbol `)', expecting `)', `,', or `}' Solution.cs(30,9): error CS1002: ; expected
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++;){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++;){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 5 error(s), 0 warnings Solution.cs(21,36): error CS1525: Unexpected symbol `;', expecting `)', `,', or `}' Solution.cs(21,37): error CS1525: Unexpected symbol `)', expecting `)', `,', or `}' Solution.cs(25,43): error CS1525: Unexpected symbol `;', expecting `)', `,', or `}' Solution.cs(25,44): error CS1525: Unexpected symbol `)', expecting `)', `,', or `}' Solution.cs(30,9): error CS1002: ; expected
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int i=0; i<columnCount; i++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 2 error(s), 0 warnings Solution.cs(25,21): error CS0136: A local variable named `i' cannot be declared in this scope because it would give a different meaning to `i', which is already used in a `parent or current' scope to denote something else Solution.cs(30,9): error CS1002: ; expected
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int =0; i<columnCount; i++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns)
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(30,9): error CS1002: ; expected
using System;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(18,5): error CS0246: The type or namespace name `ArrayList' could not be found. Are you missing an assembly reference?
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList<ArrayList<int>> rows = new ArrayList<ArrayList<int>>();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(19,5): error CS0308: The non-generic type `System.Collections.ArrayList' cannot be used with the type arguments /opt/lang/mono/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList rows = new ArrayList();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList rows = new ArrayList();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList<int> newColunmns = new ArrayList<int>();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 7 error(s), 0 warnings Solution.cs(12,40): error CS0122: `Matrix.Matrix(int, int)' is inaccessible due to its protection level Solution.cs(21,5): (Location of the symbol related to previous error) Solution.cs(14,9): error CS0103: The name `println' does not exist in the current context Solution.cs(14,39): error CS0122: `Matrix.GetCell(int, int)' is inaccessible due to its protection level Solution.cs(34,9): (Location of the symbol related to previous error) Solution.cs(23,13): error CS0308: The non-generic type `System.Collections.ArrayList' cannot be used with the type arguments /opt/lang/mono/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error) Solution.cs(27,17): error CS0841: A local variable `newColunmns' cannot be used before it is declared Solution.cs(30,27): error CS0841: A local variable `newColunmns' cannot be used before it is declared Solution.cs(36,35): error CS0021: Cannot apply indexing with [] to an expression of type `object'
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList rows = new ArrayList();
Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 4 error(s), 0 warnings Solution.cs(12,40): error CS0122: `Matrix.Matrix(int, int)' is inaccessible due to its protection level Solution.cs(21,5): (Location of the symbol related to previous error) Solution.cs(14,9): error CS0103: The name `println' does not exist in the current context Solution.cs(14,39): error CS0122: `Matrix.GetCell(int, int)' is inaccessible due to its protection level Solution.cs(34,9): (Location of the symbol related to previous error) Solution.cs(36,35): error CS0021: Cannot apply indexing with [] to an expression of type `object'
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 3 error(s), 0 warnings Solution.cs(14,9): error CS0103: The name `println' does not exist in the current context Solution.cs(14,39): error CS0122: `Matrix.GetCell(int, int)' is inaccessible due to its protection level Solution.cs(34,9): (Location of the symbol related to previous error) Solution.cs(36,35): error CS0021: Cannot apply indexing with [] to an expression of type `object'
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
System.out.println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(14,15): error CS1041: Identifier expected, `out' is a keyword
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
System.Out.println(FiveToFiveTimesMatrix.GetCell(0,0));
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 2 error(s), 0 warnings Solution.cs(14,16): error CS0234: The type or namespace name `Out' does not exist in the namespace `System'. Are you missing an assembly reference? Solution.cs(36,35): error CS0021: Cannot apply indexing with [] to an expression of type `object'
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
Console.WriteLine("Hello World!");
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
Console.WriteLine("Hello World!");
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 2 error(s), 0 warnings Solution.cs(10,16): error CS0161: `Solution.solution(int[])': not all code paths return a value Solution.cs(36,35): error CS0021: Cannot apply indexing with [] to an expression of type `object'
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
Console.WriteLine("Hello World!");
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
Console.WriteLine("Hello World!");
return new int[];
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(16,16): error CS1586: Array creation must have array size or array initializer
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
Console.WriteLine("Hello World!");
return new int[12];
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 2 error(s), 0 warnings Solution.cs(16,16): error CS0029: Cannot implicitly convert type `int[]' to `int' Solution.cs(38,35): error CS0021: Cannot apply indexing with [] to an expression of type `object'
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
Console.WriteLine("Hello World!");
return 12;
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
Console.WriteLine("Hello World!");
return 12;
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 1 error(s), 1 warnings Solution.cs(12,16): warning CS0219: The variable `FiveToFiveTimesMatrix' is assigned but its value is never used Solution.cs(38,35): error CS0021: Cannot apply indexing with [] to an expression of type `object'
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
Console.WriteLine("Hello World!");
return 12;
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
Console.WriteLine(FiveToFiveTimesMatrix);
return 12;
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(39,35): error CS0021: Cannot apply indexing with [] to an expression of type `object'
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
Console.WriteLine(FiveToFiveTimesMatrix);
return 12;
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return (int)rows[rowNumber][columnNumber];
}catch(Exception ex){
throw ex;
}
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(39,40): error CS0021: Cannot apply indexing with [] to an expression of type `object'
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
Console.WriteLine(FiveToFiveTimesMatrix);
return 12;
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return 12;
}catch(Exception ex){
throw ex;
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
// Initialize Matrix for 5 * 5
Matrix FiveToFiveTimesMatrix = new Matrix(5,5);
Console.WriteLine(FiveToFiveTimesMatrix);
return 12;
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return 12;
}catch(Exception ex){
throw ex;
}
}
}
Matrix
Matrix
Matrix
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
}
}
public class Matrix {
ArrayList rows = new ArrayList();
public Matrix(int rowCount, int columnCount){
for(int i=0; i<rowCount; i++){
ArrayList newColunmns = new ArrayList();
// Add blank all Column
for(int j=0; j<columnCount; j++){
newColunmns.Add(0);
}
this.rows.Add(newColunmns);
}
}
int GetCell(int rowNumber, int columnNumber){
try{
return 12;
}catch(Exception ex){
throw ex;
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = A
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.length + 1)
return length;
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(13,8): error CS1525: Unexpected symbol `return'
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.length + 1);
return length;
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(11,25): error CS1061: Type `int[]' does not contain a definition for `length' and no extension method `length' of type `int[]' could be found. Are you missing an assembly reference? /opt/lang/mono/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A + 1);
return length;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Leng + 1);
return length;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Leng + 1);
return d;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
return ;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
return length;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
// 2 % 2 = 0 Square
//
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
A.ForEach()
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
forEach
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
foreach (int item in collection)
{
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
foreach (int a in A)
{
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
foreach (int a in A)
{
int prev = a;
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList< prevNumbers = new ArrayList();
foreach (int a in A)
{
int prev = a;
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevNumbers = new ArrayList<int>();
foreach (int a in A)
{
if(prevNumbers.Count === 0)
prevNumbers.Add(a);
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevNumbers = new ArrayList<int>();
foreach (int a in A)
{
if(prevNumbers.Count === 0){
}
prevNumbers.Add(a);
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevNumbers = new ArrayList<int>();
foreach (int a in A)
{
if(prevNumbers.Count === 0){
if(a === 1)
result =
}
prevNumbers.Add(a);
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevNumbers = new ArrayList<int>();
foreach (int a in A)
{
if(prevNumbers.Count == 0){
if(a === 1)
result = 1;
else
result = 0;
}
else
{
prevNumbers.Add(a);
}
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevNumbers = new ArrayList<int>();
foreach (int a in A)
{
if(prevNumbers.Count == 0){
if(a === 1)
result = 1;
else
result = 0;
}
else
{
prevNumbers.Add(a);
}
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevNumbers = new ArrayList<int>();
foreach (int a in A)
{
if(prevNumbers.Count == 0){
if(a === 1)
result = 1;
else
result = 0;
}
else
{
prevNumbers.Add(a);
}
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevNumbers = new ArrayList<int>();
foreach (int a in A)
{
if(prevNumbers.Count == 0){
if(a === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevNumbers.Add(a);
}
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevNumbers = new ArrayList<int>();
foreach (int a in A)
{
if(prevNumbers.Count == 0){
if(a === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevNumbers.Add(a);
int prevNumber = prevNumbers(prevNumbers.Count - 1);
}
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevNumbers = new ArrayList<int>();
foreach (int a in A)
{
if(prevNumbers.Count == 0){
if(a === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevNumbers.Add(a);
int prevNumber = prevNumbers[prevNumbers.Count - 1];
}
}
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevNumbers = new ArrayList<int>();
foreach (int a in A)
{
if(prevNumbers.Count == 0){
if(a === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevNumbers.Add(a);
int prevNumber = prevNumbers[prevNumbers.Count - 1];
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevNumbers = new ArrayList<int>();
foreach (int currentNumb in A)
{
if(prevNumbers.Count == 0){
if(a === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevNumbers.Add(a);
int prevNumber = prevNumbers[prevNumbers.Count - 1];
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevNumbers = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevNumbers.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevNumbers.Add(currentBlockCount);
int prevNumber = prevNumbers[prevNumbers.Count - 1];
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCount = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCount.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevNumbers.Add(currentBlockCount);
int prevNumber = prevNumbers[prevNumbers.Count - 1];
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCount = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCount.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCount.Add(currentBlockCount);
int prevNumber = prevBlockCount[prevBlockCount.Count - 1];
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCount = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCount.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCount.Add(currentBlockCount);
int prevNumber = prevBlockCount[prevBlockCount.Count - 1];
currentBlockCount
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCount = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCount.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCount.Add(currentBlockCount);
int prevNumber = prevBlockCount[prevBlockCount.Count - 1];
currentBlockCount %
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCountList = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevNumber = prevBlockCountList[prevBlockCountList.Count - 1];
currentBlockCount %
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCountList = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = prevBlockCountList[prevBlockCountList.Count - 1];
// Square
if((currentBlockCount % prevBlockCount) == 0)
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCountList = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = prevBlockCountList[prevBlockCountList.Count - 1];
// Square
if((currentBlockCount % prevBlockCount) == 0){
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCountList = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = prevBlockCountList[prevBlockCountList.Count - 1];
// Square
if((currentBlockCount % prevBlockCount) == 0){
Sys
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCountList = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = prevBlockCountList[prevBlockCountList.Count - 1];
// Square
if((currentBlockCount % prevBlockCount) == 0){
Console.WriteLine($"{}");
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCountList = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = prevBlockCountList[prevBlockCountList.Count - 1];
// Square
if((currentBlockCount % prevBlockCount) == 0){
Console.WriteLine($"currentBlockCount : {currentBlockCount}");
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCountList = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = prevBlockCountList[prevBlockCountList.Count - 1];
// Square
if((currentBlockCount % prevBlockCount) == 0){
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCountList = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = prevBlockCountList[prevBlockCountList.Count - 1];
// Square
if((currentBlockCount % prevBlockCount) == 0){
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCountList = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCountList = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount === 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
}
return result;
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(20,39): error CS1525: Unexpected symbol `='
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCountList = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount == 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList<int> prevBlockCountList = new ArrayList<int>();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount == 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
}
return result;
}
}
Compilation failed: 4 error(s), 0 warnings Solution.cs(16,9): error CS0308: The non-generic type `System.Collections.ArrayList' cannot be used with the type arguments /opt/lang/mono/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error) Solution.cs(19,16): error CS0841: A local variable `prevBlockCountList' cannot be used before it is declared Solution.cs(28,17): error CS0841: A local variable `prevBlockCountList' cannot be used before it is declared Solution.cs(30,38): error CS0841: A local variable `prevBlockCountList' cannot be used before it is declared
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount == 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int length = (A.Length + 1);
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount == 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount == 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount == 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
Console.WriteLine("this is a debug message");
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
Console.WriteLine("this is a debug message");
if(prevBlockCountList.Count == 0){
if(currentBlockCount == 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
}
return result;
}
}
this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message
this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message
this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
Console.WriteLine("this is a debug message");
if(prevBlockCountList.Count == 0){
if(currentBlockCount == 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
}
return result;
}
}
this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message
this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message
this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message this is a debug message
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
if(prevBlockCountList.Count == 0){
if(currentBlockCount == 1)
result = 1;
else
result = 0;
}
else
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
return result;
}
}
prevBlockCount : 1 currentBlockCount : 1 prevBlockCount : 2 currentBlockCount : 2 prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 3 currentBlockCount : 3 prevBlockCount : 1 currentBlockCount : 1 prevBlockCount : 3 currentBlockCount : 3
prevBlockCount : 3 currentBlockCount : 3 prevBlockCount : 3 currentBlockCount : 3 prevBlockCount : 3 currentBlockCount : 3 prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 4 currentBlockCount : 4
prevBlockCount : 6 currentBlockCount : 6 prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 6 currentBlockCount : 6 prevBlockCount : 2 currentBlockCount : 2 prevBlockCount : 2 currentBlockCount : 2
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
if(prevBlockCountList.Count == 1)
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
if(prevBlockCountList.Count == 1)
continue;
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count - 1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
return result;
}
}
prevBlockCount : 2 currentBlockCount : 2 prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 3 currentBlockCount : 3 prevBlockCount : 1 currentBlockCount : 1 prevBlockCount : 3 currentBlockCount : 3
prevBlockCount : 3 currentBlockCount : 3 prevBlockCount : 3 currentBlockCount : 3 prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 4 currentBlockCount : 4
prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 6 currentBlockCount : 6 prevBlockCount : 2 currentBlockCount : 2 prevBlockCount : 2 currentBlockCount : 2
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
if(prevBlockCountList.Count == 1)
continue;
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count ];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
if(prevBlockCountList.Count == 1)
continue;
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
return result;
}
}
Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item (Int32 index) [0x00000] in <filename unknown>:0 at Solution.solution (System.Int32[] A) [0x00000] in <filename unknown>:0 at SolutionWrapper.run (System.String input, System.String output) [0x00000] in <filename unknown>:0 at SolutionWrapper.Main (System.String[] args) [0x00000] in <filename unknown>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item (Int32 index) [0x00000] in <filename unknown>:0 at Solution.solution (System.Int32[] A) [0x00000] in <filename unknown>:0 at SolutionWrapper.run (System.String input, System.String output) [0x00000] in <filename unknown>:0 at SolutionWrapper.Main (System.String[] args) [0x00000] in <filename unknown>:0
Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item (Int32 index) [0x00000] in <filename unknown>:0 at Solution.solution (System.Int32[] A) [0x00000] in <filename unknown>:0 at SolutionWrapper.run (System.String input, System.String output) [0x00000] in <filename unknown>:0 at SolutionWrapper.Main (System.String[] args) [0x00000] in <filename unknown>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item (Int32 index) [0x00000] in <filename unknown>:0 at Solution.solution (System.Int32[] A) [0x00000] in <filename unknown>:0 at SolutionWrapper.run (System.String input, System.String output) [0x00000] in <filename unknown>:0 at SolutionWrapper.Main (System.String[] args) [0x00000] in <filename unknown>:0
Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item (Int32 index) [0x00000] in <filename unknown>:0 at Solution.solution (System.Int32[] A) [0x00000] in <filename unknown>:0 at SolutionWrapper.run (System.String input, System.String output) [0x00000] in <filename unknown>:0 at SolutionWrapper.Main (System.String[] args) [0x00000] in <filename unknown>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.Collections.ArrayList.get_Item (Int32 index) [0x00000] in <filename unknown>:0 at Solution.solution (System.Int32[] A) [0x00000] in <filename unknown>:0 at SolutionWrapper.run (System.String input, System.String output) [0x00000] in <filename unknown>:0 at SolutionWrapper.Main (System.String[] args) [0x00000] in <filename unknown>:0
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
if(prevBlockCountList.Count == 1)
continue;
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count-1];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
return result;
}
}
prevBlockCount : 2 currentBlockCount : 2 prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 3 currentBlockCount : 3 prevBlockCount : 1 currentBlockCount : 1 prevBlockCount : 3 currentBlockCount : 3
prevBlockCount : 3 currentBlockCount : 3 prevBlockCount : 3 currentBlockCount : 3 prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 4 currentBlockCount : 4
prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 6 currentBlockCount : 6 prevBlockCount : 2 currentBlockCount : 2 prevBlockCount : 2 currentBlockCount : 2
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
if(prevBlockCountList.Count == 1)
continue;
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count-];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
if(prevBlockCountList.Count == 1)
continue;
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count-2];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
result = prevBlockCount;
}
}
return result;
}
}
prevBlockCount : 1 currentBlockCount : 2 prevBlockCount : 2 currentBlockCount : 5 prevBlockCount : 5 currentBlockCount : 3 prevBlockCount : 3 currentBlockCount : 1 prevBlockCount : 1 currentBlockCount : 3
prevBlockCount : 3 currentBlockCount : 3 prevBlockCount : 3 currentBlockCount : 3 prevBlockCount : 3 currentBlockCount : 5 prevBlockCount : 5 currentBlockCount : 4
prevBlockCount : 6 currentBlockCount : 5 prevBlockCount : 5 currentBlockCount : 5 prevBlockCount : 5 currentBlockCount : 6 prevBlockCount : 6 currentBlockCount : 2 prevBlockCount : 2 currentBlockCount : 2
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
// Store Previous Number
prevBlockCountList.Add(currentBlockCount);
if(prevBlockCountList.Count == 1)
continue;
int prevBlockCount = (int)prevBlockCountList[prevBlockCountList.Count-2];
Console.WriteLine($"prevBlockCount : { prevBlockCount }");
Console.WriteLine($"currentBlockCount : { currentBlockCount }");
// Square
if((currentBlockCount % prevBlockCount) == 0){
}
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
ArrayList prevBlockCountList = new ArrayList();
foreach (int currentBlockCount in A)
{
}
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
A.
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
A.d
return result;
}
}
using System;
using System.Collections;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
A.Max
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
A.Max
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
result = A.Max();
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
result = A.Max();
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
result = A.Max();
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
// 2 % 2 = 0 Square
// 1 * 1 = 0 Square
int highestNum = A.Max();
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Length
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Length;
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Length;
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Length;
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Length;
for(int i = 0; A.Length < 0; i++){
}
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Length;
for(int i = 0; A.Length < 0; i++){
}
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Length;
for(int i = 0; A.Length < 0; i++){
}
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A;
for(int i = 0; A.Length < 0; i++){
}
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; A.Length < 0; i++){
}
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
}
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
for(int i = 0; hightestPossible < 0; i++){
}
}
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
for(int i = 0; A.Length; < 0; i++){
}
}
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
for(int j = 0; A.Length; < 0; j++){
}
}
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
forEach(int a in A){
}
}
return hightestPossible;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
forEach(int a in A){
}
}
return hightestPossible;
}
}
Compilation failed: 5 error(s), 0 warnings Solution.cs(17,24): error CS1525: Unexpected symbol `a', expecting `.' Solution.cs(19,13): error CS1002: ; expected Solution.cs(22,14): error CS1519: Unexpected symbol `return' in class, struct, or interface member declaration Solution.cs(22,32): error CS1519: Unexpected symbol `;' in class, struct, or interface member declaration Solution.cs(24,0): error CS1525: Unexpected symbol `}'
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
forEach(int a in A){
}
}
return result;
}
}
Compilation failed: 5 error(s), 0 warnings Solution.cs(17,24): error CS1525: Unexpected symbol `a', expecting `.' Solution.cs(19,13): error CS1002: ; expected Solution.cs(22,14): error CS1519: Unexpected symbol `return' in class, struct, or interface member declaration Solution.cs(22,22): error CS1519: Unexpected symbol `;' in class, struct, or interface member declaration Solution.cs(24,0): error CS1525: Unexpected symbol `}'
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
foreach(int a in A){
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
foreach(int a in A){
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
foreach(int a in A){
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
foreach(int a in A){
a
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
foreach(int a in A){
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
foreach(int a in A){
d
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
foreach(int a in A){
a == hightestPossible
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
if(a == hightestPossible){
}
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
if(a == hightestPossible){
possibleCount++;
}
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int ghi
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
if(a == hightestPossible){
possibleCount++;
}
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
if(a == hightestPossible){
possibleCount++;
}
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
if(a == hightestPossible){
possibleCount++;
}
}
if(hightestCalc )
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
if(a == hightestCalc){
possibleCount++;
}
}
if(hightestCalc )
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
if(a == hightestCalc){
possibleCount++;
}
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
\
foreach(int a in A){
if(a == hightestCalc){
possibleCount++;
}
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; A.Length < 0; i++){
int possibleCount = 0;
foreach(int a in A){
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; A.Length < 0; i++){
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
a
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
if(a > hightestPossible){
}
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
if(a >= hightestPossible){
}
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
if(a >= hightestPossible){
}
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int possibleCount = 0;
foreach(int a in A){
if(a >= hightestPossible){
}
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestPossible){
hitCount++;
}
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestPossible){
hitCount++;
}
}
hitCount >= hightestPossible
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestPossible){
hitCount++;
}
}
if(hitCount >= hightestPossible)
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestPossible){
hitCount++;
}
}
if(hitCount != hightestCalc){
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestPossible){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
console.log(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(28,17): error CS0103: The name `console' does not exist in the current context
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
Console.WriteLine("this is a debug message");
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
Console.WriteLine("this is a debug message");
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
Console.WriteLine(hightestPossible);
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
5
5
6
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
Console.WriteLine("d");
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
d
d
d
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
Console.WriteLine("d");
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
Console.WriteLine("d");
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
Console.WriteLine(hightestPossible.toString());
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(16,44): error CS1061: Type `int' does not contain a definition for `toString' and no extension method `toString' of type `int' could be found. Are you missing an assembly reference? /opt/lang/mono/lib/mono/4.5/mscorlib.dll (Location of the symbol related to previous error)
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
Console.WriteLine( A.Max());
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
5
5
6
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
Console.WriteLine("this is a debug message");
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < 0; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible ; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < i; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; hightestPossible < i; i++){
Console.WriteLine("this is a debug message");
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
4 3
4 3 2 1 0
5 4
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible + 1; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
4 3
4 3 2 1 0 -1
5 4
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
4 3
4 3 2 1 0
5 4
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(4444444444);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
4 3 4444444444 4444444444 4444444444
4 3 2 1 0
5 4 4444444444 4444444444 4444444444 4444444444
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(""4444444444"");
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine($"ee:{hitCount}");
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
4 3 ee:3 ee:3 ee:3
4 3 2 1 0
5 4 ee:4 ee:4 ee:4 ee:4
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
else{
continue;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
else{
continue;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
else{
br
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
else{
hitCount = 0;
break;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
else{
break;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
else{
break;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
consoge.WriteLine()
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
else{
break;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
consoge.WriteLine(hitCount);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(34,17): error CS0103: The name `consoge' does not exist in the current context
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
consoge.WriteLine(hitCount);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
else{
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
consoge.WriteLine(hitCount);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
else{
break;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
consoge.WriteLine(hitCount);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(34,17): error CS0103: The name `consoge' does not exist in the current context
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
else{
break;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
4 3 2 1 0
4 3 2 1 0
5 4 4 4 4 4
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
// if(possibleCount == 0)
// hightestCalc = hightestCalc - 1;
}
return result;
}
}
4 3 3 3 3
4 3 2 1 0
5 4 4 4 4 4
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
if(possibleCount == 0)
hightestCalc = hightestCalc - 1;
}
return result;
}
}
Compilation failed: 1 error(s), 0 warnings Solution.cs(34,16): error CS0103: The name `possibleCount' does not exist in the current context
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
4 3 3 3 3
4 3 2 1 0
5 4 4 4 4 4
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
Console.WriteLine("this is a debug message");
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
this is a debug message 4 this is a debug message 3 this is a debug message 3 this is a debug message 3 this is a debug message 3
this is a debug message 4 this is a debug message 3 this is a debug message 2 this is a debug message 1 this is a debug message 0
this is a debug message 5 this is a debug message 4 this is a debug message 4 this is a debug message 4 this is a debug message 4 this is a debug message 4
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
4 3 3 3 3
4 3 2 1 0
5 4 4 4 4 4
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
Console.WriteLine("this is a debug message");
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
this is a debug message 4 this is a debug message 3 3 3 3
this is a debug message 4 this is a debug message 3 this is a debug message 2 this is a debug message 1 this is a debug message 0
this is a debug message 5 this is a debug message 4 4 4 4 4
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}e
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{
if(hitCount <
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{
if(hitCount < hightestCalc){
}
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{
if(hitCount < hightestCalc){
hitCount =
}
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{
if(hitCount < hightestCalc){
hitCount = 0;
}
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
4 3 2 1 0
4 3 2 1 0
5 4 4 4 4 4
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
hightestCalc = hightestCalc - 1;
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
hightestCalc = hightestCalc - 1;
if(hitCount != hightestCalc){
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
5 4 3 2 1
5 4 3 2 1
6 5 4 3 2 1
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
Console.WriteLine(hightestCalc);
}
else{
Console.WriteLine(hitCount);
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
Console.WriteLine("a");
}
else{
Console.WriteLine("b");
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
a a b a a
a a a a a
a a b a a a
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
Console.WriteLine("a");
}
else{
Console.WriteLine("b");
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
Console.WriteLine("a");
}
else{
Console.WriteLine(hitCount);
Console.WriteLine("b");
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
a a 3 b a a
a a a a a
a a 4 b a a a
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
if(hitCount != hightestCalc){
Console.WriteLine("a");
}
else{
Console.WriteLine(hitCount);
Console.WriteLine("b");
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
a a 3 b a a
a a a a a
a a 4 b a a a
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{
hitCount
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{
hitCount
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{
if(hitCount < hightestCalc){
}
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{
if(hitCount != 0 && (hitCount < hightestCalc){
}
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{
if((hitCount != 0) && (hitCount < hightestCalc)){
}
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{
if((hitCount != 0) && (hitCount < hightestCalc)){
hitCount = 0;
}
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
}else{
if((hitCount != 0) && (hitCount < hightestCalc)){
hitCount = 0;
}
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
if(hitCount == hightestCalc)
}else{
if((hitCount != 0) && (hitCount < hightestCalc)){
hitCount = 0;
}
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
if(hitCount == hightestCalc){
}
}else{
if((hitCount != 0) && (hitCount < hightestCalc)){
hitCount = 0;
}
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
if(hitCount == hightestCalc){
result = hightestCalc;
}
}else{
if((hitCount != 0) && (hitCount < hightestCalc)){
hitCount = 0;
}
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
if(hitCount == hightestCalc){
result = hightestCalc;
return result;
}
}else{
if((hitCount != 0) && (hitCount < hightestCalc)){
hitCount = 0;
}
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
if(hitCount == hightestCalc){
result = hightestCalc;
return result;
}
}else{
if((hitCount != 0) && (hitCount < hightestCalc)){
hitCount = 0;
}
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
using System;
using System.Collections;
using System.Linq;
// you can also use other imports, for example:
// using System.Collections.Generic;
// you can write to stdout for debugging purposes, e.g.
// Console.WriteLine("this is a debug message");
class Solution {
public int solution(int[] A) {
int result = 0;
int hightestPossible = A.Max();
int hightestCalc = hightestPossible;
for(int i = 0; i < hightestPossible; i++){
int hitCount = 0;
foreach(int a in A){
if(a >= hightestCalc){
hitCount++;
if(hitCount == hightestCalc){
result = hightestCalc;
return result;
}
}else{
if((hitCount != 0) && (hitCount < hightestCalc)){
hitCount = 0;
}
}
}
hightestCalc = hightestCalc - 1;
}
return result;
}
}
The following issues have been detected: timeout errors.
Tests with the biggest square surrounded by shorter columns. N <= 10.
Tests with alternating small and big numbers (relatively). N <= 15.
Two monotonic sequences or one monotonic and one constant. N <= 75.
Tests with local maximums and local minimums. N <= 75.
Randomly generated tests. N <= 10,000. Score x 2.
running time: 0.364 sec., time limit: 0.100 sec.