摘要:
Description 在一只大灰狼偷偷潜入Farmer Don的牛群被群牛发现后,贝西现在不得不履行着她站岗的职责。从她的守卫塔向下瞭望简直就是一件烦透了的事情。她决定做一些开发智力的小练习,防止她睡着了。想象牧场是一个X,Y平面的网格。她将N只奶牛标记为1…N (1 <= N <= 100,00 阅读全文
摘要:
Description Input 第一行为N,1<N<=50000,表示树的节点数目,树的节点从1到N编号。接下来N-1行,每行两个整数U,V,表示U与V之间有一条边。再接下N行,每行一个正整数,其中第i行的正整数表示编号为i的节点权值为W(I),树的深度<=100 第一行为N,1<N<=5000 阅读全文
该文被密码保护。 阅读全文
该文被密码保护。 阅读全文
摘要:
Ivan has an array consisting of n elements. Each of the elements is an integer from 1 to n. Ivan has an array consisting of n elements. Each of the el 阅读全文
摘要:
Polycarp is in really serious trouble — his house is on fire! It's time to save the most valuable items. Polycarp estimated that it would take tisecon 阅读全文