A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/premierconsult/public_html/index.php:65)

Filename: core/Input.php

Line Number: 408

A PHP Error was encountered

Severity: Warning

Message: session_start(): Cannot send session cookie - headers already sent by (output started at /home/premierconsult/public_html/index.php:65)

Filename: Session/Session.php

Line Number: 143

A PHP Error was encountered

Severity: Warning

Message: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/premierconsult/public_html/index.php:65)

Filename: Session/Session.php

Line Number: 143

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/premierconsult/public_html/index.php:65)

Filename: controllers/Questions.php

Line Number: 330

A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/premierconsult/public_html/index.php:65)

Filename: core/Common.php

Line Number: 564

Database Error

A Database Error Occurred

Error Number: 188

FTS query exceeds result cache limit

SELECT DISTINCT `questions`.*, `users`.`User_name` AS `Teacher_name`, MATCH (Title) AGAINST('the number of different possible color assignments. The number can be quite big, so the King has requested to know the answer modulo 1000000007?') AS rel1, MATCH (Details) AGAINST('the number of different possible color assignments. The number can be quite big, so the King has requested to know the answer modulo 1000000007?') AS rel3, MATCH (Title) AGAINST('

Far`, `far` `away`, there is the mystical Kingdom of Trees (more formally, \"Royal Commonwealth of Connected Undirected Simple Acyclic Graphs\"). The King there is very sad because his kingdom is not accepted as a sovereign state in the United Nations. In order to become a member, he needs to make a flag the UN can put on their website.The flag will of course consist of the King\'s favorite tree, which contains n nodes. The King would be happy to just have the tree colored in black and white, `but for the sake of his wife the` `Queen`, he decided that the tree will contain all the favorite colors of their k children (they all have distinct favorite colors). Clearly, `no two neighboring nodes can have the same` `color`, but otherwise any coloring of the tree using exactly the k colors would make a feasible flag candidate.How many different flags are possible?

Input:

The first line contains two integers n and k (2kn2500), where n is the number of nodes in the King\'s favorite tree and k is the number of children. Then follow n1 lines describing the edges in the tree; the i\'th of these lines contains a non-negative integer pi<i, meaning that node pi is the parent of iThe nodes are numbered from 0 to n1 and the tree is rooted at node 0. Note that the embedding of the tree on the flag is already fixed, `the only thing that remains is to assign colors`.`

Output:

the number of different possible color assignments`.` The number can be quite` `big`, so the King has requested to know the answer modulo 

1000000007.

') AS rel4, MATCH (Details) AGAINST('

Far`, `far` `away`, there is the mystical Kingdom of Trees (more formally, \"Royal Commonwealth of Connected Undirected Simple Acyclic Graphs\"). The King there is very sad because his kingdom is not accepted as a sovereign state in the United Nations. In order to become a member, he needs to make a flag the UN can put on their website.The flag will of course consist of the King\'s favorite tree, which contains n nodes. The King would be happy to just have the tree colored in black and white, `but for the sake of his wife the` `Queen`, he decided that the tree will contain all the favorite colors of their k children (they all have distinct favorite colors). Clearly, `no two neighboring nodes can have the same` `color`, but otherwise any coloring of the tree using exactly the k colors would make a feasible flag candidate.How many different flags are possible?

Input:

The first line contains two integers n and k (2kn2500), where n is the number of nodes in the King\'s favorite tree and k is the number of children. Then follow n1 lines describing the edges in the tree; the i\'th of these lines contains a non-negative integer pi<i, meaning that node pi is the parent of iThe nodes are numbered from 0 to n1 and the tree is rooted at node 0. Note that the embedding of the tree on the flag is already fixed, `the only thing that remains is to assign colors`.`

Output:

the number of different possible color assignments`.` The number can be quite` `big`, so the King has requested to know the answer modulo 

1000000007.

') AS rel2 FROM `questions` JOIN `questions_categories` ON `questions_categories`.`Question_id` = `questions`.`Id` JOIN `users` ON `users`.`Id` = `questions`.`Publisher_user_id` WHERE (`questions_categories`.`Category_id` = 52 OR `questions_categories`.`Category_id` = 26) AND `questions`.`Id` != '3569' AND `questions`.`Is_active` = 1 AND MATCH (`Title`, `Details`) AGAINST ('the number of different possible color assignments. The number can be quite big, so the King has requested to know the answer modulo 1000000007?') AND MATCH (`Title`, `Details`) AGAINST ('

Far, far away, there is the mystical Kingdom of Trees (more formally, \"Royal Commonwealth of Connected Undirected Simple Acyclic Graphs\"). The King there is very sad because his kingdom is not accepted as a sovereign state in the United Nations. In order to become a member, he needs to make a flag the UN can put on their website.The flag will of course consist of the King\'s favorite tree, which contains n nodes. The King would be happy to just have the tree colored in black and white, but for the sake of his wife the Queen, he decided that the tree will contain all the favorite colors of their k children (they all have distinct favorite colors). Clearly, no two neighboring nodes can have the same color, but otherwise any coloring of the tree using exactly the k colors would make a feasible flag candidate.How many different flags are possible?

Input:

The first line contains two integers n and k (2kn2500), where n is the number of nodes in the King\'s favorite tree and k is the number of children. Then follow n1 lines describing the edges in the tree; the i\'th of these lines contains a non-negative integer pi<i, meaning that node pi is the parent of iThe nodes are numbered from 0 to n1 and the tree is rooted at node 0. Note that the embedding of the tree on the flag is already fixed, the only thing that remains is to assign colors.

Output:

the number of different possible color assignments. The number can be quite big, so the King has requested to know the answer modulo 

1000000007.

') ORDER BY `questions`.`Is_vip` DESC, (rel1*1.5)+(rel2*1)+(rel3*0.3)+(rel4*0.6) DESC, `questions`.`Id` DESC LIMIT 4

Filename: models/Questions_model.php

Line Number: 621