I'm Maria and I'm part of the CodinGame team. For those who are not familiar with our concept, we are a video games platform for programming fans. Players can solve our solo games available in the platform as well as join our multiplayer AI Battles once a month.

We have recently launched our new platform which includes features such as a full IDE, 20+ programming languages, game visuals, auto-completion,etc.

We are now trying to improve it and we are looking for feedback from the community to make it much more fun for everyone, so if you know the platform and are interested in giving us your opinion and ways of improvements, you are more than welcome to comment

Thank you very much!

Maria

]]>My answer:

Var x;

Function equate(list m)

If(length.m >=1)

Var l.list, r.list;

Var int middle = length.m /2;

For(int i = 0; i < middle; i++)

For(int j = 1;j < middle; j++)

l.list(i)*l.list(j)

if(l.list(i)*l.list(j) =x)

print l.list(i), l.list(j)

For(int i = middle; i < m; i++)

For(int j = middle; j < m; j++)

r.list(i)*r.list(j)

if(r.list(i)*r.list(j) = x)

print r.list(i),r.list(j)

I want to make sure if this is correct! If I have to change something please show me on my code what I have to change, and explain! Thanks!

]]>

1234

2134

2143 ... n so on.

can any please tell me how do i proceed ? i have devised an algorithm myself, which swaps consecutive numbers... but it works only for 3 digit numbers. but the above mentioned problem needs to work for all numbers.

plzzz help ...

"[b]The[blue] GEEK[/blue] Shall Inherit The Earth" ;-) [/b]]]>

This is what I have:

Var x;

Function equate( list m)

// if list size is 0 empty or 1 print computation can not be done

If(length m >=1)

Divide the lists into two parts

Var list left ,right ;

Var int middle = length (m) /2;

For each x in before middle

Add x to the left // left is an array

Loop : For (int i=0;i< middle;i++ )

For (int j= 1;j<middle;j++)

multiply left (i)xleft(j)

if (left (i)xleft(j) =x )

print left (i) , left(j)

For each x in after middle before length(m) // right is an array

Add x to the right

Loop : For (int i=middle ; i< m ;i++ )

For (int j= middle ;j<m ;j++)

multiply right (i)x right (j)

if (right (i)xright (j) =x )

print right (i), right j

Is this correct. Please, do not make it complicated. I want to keep it simple. If it is correct or I have to change something please tell me the line, and what it should look like, write the line out! Thank you!

]]>

I write QR decoder.

If I get distortion QR image,

decoder cannot recognize it.

For example, if I make QR photo angularly.

How can I adjust QR image?

]]>

Each group can also have n numbers of students.

Example:5 groups

group 1(math) : student a ,b,c,d ,e

group 2(english): student b,c,f,g

group 3(biology): h,i,g,k,s,m,n,o,p

group 4(chemistry): a,f,,n,z

group 5(computing):b,q,y,w

Result: i could create an algorithm that selects the first element of every group so all groups are covered however that isnt efficient

a good efficient minimum would be: b, n

where do I start? what data structures can i use to make it efficient?]]>

Each group can also have n numbers of students.

Example:5 groups

group 1(math) : student a ,b,c,d ,e

group 2(english): student b,c,f,g

group 3(biology): h,i,g,k,s,m,n,o,p

group 4(chemistry): a,f,,n,z

group 5(computing):b,q,y,w

Result: i could create an algorithm that selects the first element of every group so all groups are covered however that isnt efficient

a good efficient minimum would be: b, n

where do I start? what data structures can i use to make it efficient?

]]>

In the prospect of render a database anonym I need to generate certain ranges of data.

I have what I need for the USA.

http://www.highprogrammer.com/alan/numbers/dl_us_shared.html

Now I need something similar for a maximum of European countries.

If you already had to do something similar, any algos or tips for any countries is welcome.]]>

[[1, "a"], [2, "b"], [1, "c"]]

print:

1, "a"

1, "c"

Thanks a lot,

C

]]>

[[1, "a"], [2, "b"], [1, "c"]]

print:

1, "a"

1, "c"

Thanks a lot,

C

]]>

But, few recent software try to transcribe voice from multiple speaker to text, some with few hours of "calculation", other in real time.

What kind of algorithm can they use to transcribe more than 1 voice ?

Can you tell me some name of different projects about multiple speaker recognition software / algorithms ?

]]>

This is what I have so far, but I have no idea if I am even correct:

Finding the minimum key stored in a B-tree is quite simple, we just do the opposite of find the maximum and that would be by finding the left most leaf / subtree for the given root. Once, we find the left most leaf / subtree of the give root the smallest element in the node would be the minimum key.

Finding the predecessor first we would have to find the maximum

]]>

]]>

]]>

Any help would be appreciated.

]]>

Any help would be appreciated.

]]>

I am trying to build an artificial neural network.

So far my network is divided into several layers, all of which comprising a certain amount of neurons. Every neuron is connected to every other neuron in the previous and following layer. Neurons receive an input from all their connections. These inputs have been multiplied by a value which is the "weight" of the connection between the two. All inputs are summed and the output of the neuron is the result of a sigmoid function which takes the sum of inputs as a parameter. Overall, the network produces a result R. The "error" of the network is given by E = 1/2*(O-D)^2 where D is the desired result. At this point, having:

a) The individual output of all neurons stored within the neuron objects

b) The overall error of the network

How should I modify the weight of the connections between neurons?

Cheers

Dario

]]>

I am trying to build an artificial neural network.

So far my network is divided into several layers, all of which comprising a certain amount of neurons. Every neuron is connected to every other neuron in the previous and following layer. Neurons receive an input from all their connections. These inputs have been multiplied by a value which is the "weight" of the connection between the two. All inputs are summed and the output of the neuron is the result of a sigmoid function which takes the sum of inputs as a parameter. Overall, the network produces a result R. The "error" of the network is given by E = 1/2*(O-D)^2 where D is the desired result. At this point, having:

a) The individual output of all neurons stored within the neuron objects

b) The overall error of the network

How should I modify the weight of the connections between neurons?

Cheers

Dario

]]>

Please i need some learning materials, please

]]>

CLRS 30.1-3

You can find the problem in this list (not my list assignment), as problem 5 http://clweb.csa.iisc.ernet.in/meghana/courses/daa/as3.pdf

Solution may involve complex roots of a unitary circle. For those of you who dont know a point-value representation of a polinomial is simply representing a polinomial o degree n by n points in the cartesian space.

Thanks in advance.

]]>

CLRS 30.1-3

You can find the problem in this list (not my list assignment), as problem 5 http://clweb.csa.iisc.ernet.in/meghana/courses/daa/as3.pdf

Solution may involve complex roots of a unitary circle. For those of you who dont know a point-value representation of a polinomial is simply representing a polinomial o degree n by n points in the cartesian space.

Thanks in advance.

]]>

]]>

for eg. my proposed system function is [b]H(z) = ( Z(1) + Z(2)z^-1 + Z(3)z^-2 ) / (1 + Z(4)z^-1 + Z(5)z^-2)[/b]

where, z is delay of Z-transform

By optimization i want to reduce error = Least mean square of (z - H(z))

So, how to vary variables Z1 to Z5 in multivariable optimization?????

kindly give some sugesstions. which algorithm should i follow?

I am using MATLAB coding for this problem.

[b]Basically i am stuck with how should i vary(following Algorithm) these 5 variable values to reach optimum points of these variable. And Which Algorithm should is follow[/b]

Thank you

]]>

and this is a picture to help me explain. The idea is to find the minimum cost between two bins. Values from the matrix are put into either bin0 or bin1 based on the Cij of the population matrix being a 0 or a 1. I then have to find the minimum resulting cost of the arcs between the two bins. the weights of the arcs are the values of the matrix which we read in, shown in the picture.

[code]import java.io.*;

import javax.swing.*;

import java.util.*;

public class Lab02Test{

static final int size = getSize();

static int matrix[][] = new int[size][size];

static int population[][] = new int[size][size];

/*static int population[][] = {

{0,1,0,0},

{0,1,0,1},

{0,0,0,1},

{1,1,0,1}

};*/

static int total[] = new int[size];

static final double mutationRate = .7;

static final double crossoverRate= .8;

static final int tournamentSize = size;

static final int runTimes = 10;

static int timesRan = 1;

public static void main(String[] args){

int cost[] = null;

int penalty[] = null;

long time0 = System.currentTimeMillis();

for(int i=0; i<=runTimes; i++){

timesRan++;

matrix = getInput();

fillPopulation(population);

cost = calcCost(matrix, population);

penalty = getPenalty(matrix,population,cost);

mutate(population);

crossOver(population);

tournamentSelection(population);

}

for(int i=0;i<size;i++){

total[i] = cost[i] + penalty[i];

System.out.println(total[i]);

}

long time1 = System.currentTimeMillis();

System.out.println("Total time to run " + runTimes + " is: " + (time1-time0)/60 + " seconds");

}

public static void tournamentSelection(int[][] population){

int randi = (int)(Math.random()*size);

int newPopulation[][] = new int[size*timesRan][size];

for(int i=0;i<tournamentSize;i++){

for(int j=0; j<tournamentSize; j++){

newPopulation[i][j] = population[randi][j]; //copies a random row into the new population

mutate(newPopulation);

crossOver(newPopulation);

}

}

//printArray2DI(newPopulation);

calcCost(matrix,newPopulation);

}

public static int[] calcCost(int[][] matrix, int[][] population){

int cost[] = new int[size];

for(int m=0;m<size;m++){

for(int i=0; i<size; i++){

for(int j=0; j<size; j++){

//System.out.println(m + " " + i + " " + j);

if(population[i][j] == 1){

cost[m] += matrix[i][j];

}

}//end for 3

}// end for 2

}//end for 1

//printArrayI(cost);

return cost;

}

public static int[] getPenalty(int[][] matrix, int[][] population, int[] cost){

int penalty[] = new int[size];

int bin0 = 0;

int bin1 = 0;

for(int i=0; i<size; i++){

for(int j=0; j<size; j++){

if(population[i][j] == 1){

bin1++;

}else{

bin0++;

}//end else

}//end for 2

penalty[i] = calcPenalty(bin1,bin0);

//System.out.println("Bin0 " + bin0 + " Bin1 " + bin1);

bin1=0;

bin0=0;

}//end for 1

//printArrayI(penalty);

return penalty;

}

public static int calcPenalty(int bin0, int bin1){

int num = Math.abs(2*(bin0-bin1));

return num;

}

public static void fillPopulation(int pop[][]){

for(int i=0; i<size;i++){

for(int j =0;j<size;j++){

double rand = Math.random();

if(rand > .5){

population[i][j] = 1;

}else{

population[i][j] = 0;

}

}

}

}//end fillPopulation

public static void mutate(int[][] population){

for(int i=0; i mutationRate){

if(population[i][j] == 1){

population[i][j] = 0;

}else{

population[i][j] = 1;

}

}

}

}

}

public static void crossOver(int[][] population){

int temp;

int split = (int)(Math.random()*(size/2));

for(int i=0; i<split; i++){

for(int j=0; j<split;j++){

temp = population[i][j];

population[i][j] = population[i+1][j+1];

population[i+1][j+1] = temp;

}

}

}

public static void printArrayI(int array[]){

for(int i=0;i<array.length;i++){

System.out.println(array[i]);

}

}//end printArray

public static void printArray2DI(int array[][]){

for(int i=0;i<array.length;i++){

for(int j=0;j<array.length;j++){

System.out.print(array[i][j]);

}

System.out.println();

}

System.out.println();

}// end printArray2DI

public static int getSize(){

int size = 0;

String text;

try{

FileReader input = new FileReader("input2.txt");

BufferedReader in = new BufferedReader(input);

text = in.readLine();

while(text != null){

//System.out.println(text);

size++;

text = in.readLine();

}//end while

}catch(IOException e){

System.out.println(e);

}//end try catch

return size;

}//end getSize

public static int[][] getInput(){

String text;

String tokens[];

int array[][] = new int[size][size];

try{

FileReader input = new FileReader("input2.txt");

BufferedReader in = new BufferedReader(input);

text = in.readLine();

int row = 0;

while(text != null){

//System.out.println(text);

tokens = text.split("\s+");

for(int j=0;j<size;j++){

array[row][j] = parseInt(tokens[j]);

}

text = in.readLine();

row++;

}//end while

//printArray(array);

}catch(IOException e){

System.out.println(e);

}//end try catch

return array;

}//end getInput

public static int parseInt(String string){

int number;

//System.out.println(string);

try{

number = Integer.parseInt(string);

}catch(NumberFormatException e){

number = -1;

}

return number;

}//end parseInt

}[/code]

]]>

do anyone here kind enough to help me with the assigment that it will be due tmr. which i myself doesnt know anything about programming.:(

thank you

question:

Design an algorithm that will prompt for and receive the time expressed in 2400 format (e.g. 2305 hours), convert it to 12-hour format (e.g 11.05pm)and display the new time to the screen. your program is to repaeat the processing until a sentinel time of 9999 is entered.]]>

do anyone here kind enough to help me with the assigment that it will be due tmr. which i myself doesnt know anything about programming.:(

thank you

question:

Design an algorithm that will prompt for and receive the time expressed in 2400 format (e.g. 2305 hours), convert it to 12-hour format (e.g 11.05pm)and display the new time to the screen. your program is to repaeat the processing until a sentinel time of 0000 is entered.]]>

Just wanted to let you all know of my newly published software called the SOM Analyzer.

[img=https://sites.google.com/site/somanalyzer/home/Main.png]

SOM Analyzer is an easy-to-use Windows software

with which you can explore the intriguing world of the Self-Organizing Map (SOM) algorithms that belong to the class of artificial neural network algorithms.

As being highly visual and intuitive, the SOM Analyzer is suited to anybody who wishes to work with the SOM Algorithm, whether a novice or a professional. For novice users, SOM Analyzer is a great learning tool while for professional users, it offers powerful data processing capabilities.

See if for yourself and check out the SOM Analyzer site at:

[link=https://sites.google.com/site/somanalyzer]https://sites.google.com/site/somanalyzer[/link]

Thanks,

Petri Hassinen

]]>

Could you please tell me what is relationship between population size and the number of input data? I have 300 values of 5 variables. I set the ratio of test data on 0.2, which values I have permission to put for population size?

Regards,

Mojy

]]>