CopeCope's blog

By CopeCope, history, 7 months ago, In English,

Given graph with $$$N$$$ vertices and there are $$$N*(N-1)/2$$$ edges, each one is either $$$(i,j)$$$ or $$$(j,i)$$$ for every $$$1<=i,j<=N$$$. How to prove or disprove that there is always a path of length $$$N-1$$$(edges) that visits every vertex once

Read more »

 
 
 
 
  • Vote: I like it
  • +15
  • Vote: I do not like it

By CopeCope, history, 8 months ago, In English,

Recently, Info Cup and Innopolis Open Final were held, and I participated in info cup and really liked the problems and also won a medal. I also qualified to Innopolis final but couldn't participate. Now, I really have a will to participate in some other competitions like these two. Does anyone know some other competitions for high school students like these two?
Thanks :)

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

By CopeCope, history, 8 months ago, In English,

Given array A of N <  = 500000 elements and each A[i] <  = N. Find number of partitions of array into some number of subsegments such that every subsegment has length greater or equal to minimum value of subsegment and smaller or equal to maximum value of subsegment.

Example:
A = {1, 6, 2, 3, 4, 3, 4}
Partitions are:
|1|6, 2, 3, 4, 3, 4|
|1, 6, 2|3, 4, 3, 4|
|1, 6, 2, 3|4, 3, 4|
|1|6, 2|3, 4, 3, 4|
|1|6, 2, 3|4, 3, 4|
|1, 6|2, 3|4, 3, 4|

How to solve this problem?

Read more »

 
 
 
 
  • Vote: I like it
  • +21
  • Vote: I do not like it

By CopeCope, history, 10 months ago, In English,

What happened with wcipeg wiki? Can't access any tutorial

Read more »

 
 
 
 
  • Vote: I like it
  • +7
  • Vote: I do not like it

By CopeCope, history, 17 months ago, In English,

Given N arrays of arbitrary length each, and M queries in form : a b. For each query output the number of arrays such that there exist Array[i] = a Array[j] = b and i < j (Basically, number of arrays such that a comes before b). Also, there can be any number of a's or b's in any array

N, M, a, b <  = 105 Consider that length of all arrays is  <  = 105

Example: Arrays
1 2 3 4
2 4
2 3 1 4

and queries are (1, 3) , (2, 4) , (1, 4) , (4, 1) answers are 1 , 3 , 2 , 0

Read more »

 
 
 
 
  • Vote: I like it
  • +9
  • Vote: I do not like it

By CopeCope, history, 21 month(s) ago, In English,

Given array A of N (N <= 106 ) elements (Ai <= 109 ). Given Q queries (Q <= 106 ). Every query consist of number K (K <= 109 ). For every query find number of subsegments such that their maximum element is K.

Test case:
5
1 2 3 4 3
3
2
3
4
Output:
2 -> [2], [1,2]
4 -> [1,2,3], [2,3], [3], [3]
8 -> [1,2,3,4], [1,2,3,4,3], [2,3,4], [2,3,4,3], [3,4], [3,4,3], [4], [4,3]

Read more »

 
 
 
 
  • Vote: I like it
  • +9
  • Vote: I do not like it