Brankonymous's blog

By Brankonymous, history, 6 months ago, In English,

Does anyone know any source material or code, when given n coordinate points, you need to calculate area of given non-convex polygone.

Read more »

 
 
 
 
  • Vote: I like it
  • -8
  • Vote: I do not like it

By Brankonymous, history, 13 months ago, In English,

Hi, can someone help me solve this problem:

Input consist of integer n and array a of n integers. Output number of pairs (a[i],a[j]), i<j who are adjacent or for all k (i<k<j) this equation is true: a[k]<=min(a[i],a[j]).

1<=n<=10^6

0<=a[i]<=2^31

example:

8

4 1 2 3 6 5 1 2

Output: 11

Read more »

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