08 2019 档案

摘要:You are given nn integer numbers a1,a2,…,ana1,a2,…,an. Consider graph on nn nodes, in which nodes ii, jj (i≠ji≠j) are connected if and only if, aiaiAN 阅读全文
posted @ 2019-08-19 20:54 black_hole6 阅读(383) 评论(0) 推荐(0) 编辑
摘要:You are given a line of nn colored squares in a row, numbered from 11 to nn from left to right. The ii-th square initially has the color cici. Let's s 阅读全文
posted @ 2019-08-16 09:40 black_hole6 阅读(332) 评论(0) 推荐(0) 编辑
摘要:The lowest common ancestor (LCA) of two nodes U and V in a tree is the deepest node that has both U and V as descendants. Given any two nodes in a bin 阅读全文
posted @ 2019-08-16 09:28 black_hole6 阅读(549) 评论(0) 推荐(0) 编辑
摘要:一个字 就是骚~感觉以后写博客都省了 阅读全文
posted @ 2019-08-12 22:39 black_hole6 阅读(345) 评论(0) 推荐(0) 编辑
摘要:Ural大学有N名职员,编号为1~N。 他们的关系就像一棵以校长为根的树,父节点就是子节点的直接上司。 每个职员有一个快乐指数,用整数 HiHi 给出,其中 1≤i≤N1≤i≤N。 现在要召开一场周年庆宴会,不过,没有职员愿意和直接上司一起参会。 在满足这个条件的前提下,主办方希望邀请一部分职员参会 阅读全文
posted @ 2019-08-12 11:00 black_hole6 阅读(351) 评论(0) 推荐(0) 编辑
摘要:Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home too quickly 阅读全文
posted @ 2019-08-11 23:40 black_hole6 阅读(374) 评论(0) 推荐(0) 编辑
摘要:在完成了分配任务之后,西部314来到了楼兰古城的西部。 相传很久以前这片土地上(比楼兰古城还早)生活着两个部落,一个部落崇拜尖刀(‘V’),一个部落崇拜铁锹(‘∧’),他们分别用V和∧的形状来代表各自部落的图腾。 西部314在楼兰古城的下面发现了一幅巨大的壁画,壁画上被标记出了N个点,经测量发现这N 阅读全文
posted @ 2019-08-10 23:18 black_hole6 阅读(371) 评论(0) 推荐(0) 编辑
摘要:Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt 阅读全文
posted @ 2019-08-09 11:42 black_hole6 阅读(356) 评论(0) 推荐(0) 编辑
摘要:Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhi 阅读全文
posted @ 2019-08-09 10:58 black_hole6 阅读(376) 评论(0) 推荐(0) 编辑
摘要:P is a permutation of the integers from 1 to N(index starting from 1). Here is the code of Bubble Sort in C++. for(int i=1;i<=N;++i) for(int j=N,t;j>i 阅读全文
posted @ 2019-08-08 21:18 black_hole6 阅读(174) 评论(0) 推荐(0) 编辑
摘要:在郊区有 N 座通信基站,P 条双向电缆,第 i 条电缆连接基站AiAi和BiBi。 特别地,1 号基站是通信公司的总站,N 号基站位于一座农场中。 现在,农场主希望对通信线路进行升级,其中升级第 i 条电缆需要花费LiLi。 电话公司正在举行优惠活动。 农产主可以指定一条从 1 号基站到 N 号基 阅读全文
posted @ 2019-08-08 11:02 black_hole6 阅读(317) 评论(0) 推荐(1) 编辑
摘要:给定长度为N的数列A,以及M条指令,每条指令可能是以下两种之一: 1、“1 x y”,查询区间 [x,y] 中的最大连续子段和,即 maxx≤l≤r≤ymaxx≤l≤r≤y{∑ri=lA[i]∑i=lrA[i]}。 2、“2 x y”,把 A[x] 改成 y。 对于每个查询指令,输出一个整数表示答案 阅读全文
posted @ 2019-08-08 10:00 black_hole6 阅读(285) 评论(0) 推荐(0) 编辑
摘要:链接:https://ac.nowcoder.com/acm/contest/16/A来源:牛客网 题目描述 FST是一名可怜的小朋友,他很强,但是经常fst,所以rating一直低迷。 但是重点在于,他非常适合ACM!并在最近的区域赛中获得了不错的成绩。 拿到奖金后FST决定买一台新笔记本,但是F 阅读全文
posted @ 2019-08-07 10:51 black_hole6 阅读(290) 评论(0) 推荐(0) 编辑
摘要:思路及代码参考:https://blog.csdn.net/u014800748/article/details/45420085 There is an infinite sequence consisting of all positive integers in the increasing 阅读全文
posted @ 2019-08-06 22:18 black_hole6 阅读(286) 评论(0) 推荐(0) 编辑
摘要:Mario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is in trouble again and Ma 阅读全文
posted @ 2019-08-06 11:30 black_hole6 阅读(272) 评论(0) 推荐(0) 编辑
摘要:Description You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked t 阅读全文
posted @ 2019-08-06 09:25 black_hole6 阅读(243) 评论(0) 推荐(0) 编辑
摘要:Problem Description String matching is a common type of problem in computer science. One string matching problem is as following:Given a string s[0…le 阅读全文
posted @ 2019-08-05 20:59 black_hole6 阅读(320) 评论(0) 推荐(0) 编辑
摘要:Mario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is in trouble again and Ma 阅读全文
posted @ 2019-08-05 09:23 black_hole6 阅读(248) 评论(0) 推荐(0) 编辑
摘要:In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacen 阅读全文
posted @ 2019-08-04 17:18 black_hole6 阅读(150) 评论(0) 推荐(0) 编辑
摘要:Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home too quickly 阅读全文
posted @ 2019-08-03 22:42 black_hole6 阅读(171) 评论(0) 推荐(1) 编辑
摘要:Recently, Shua Shua had a big quarrel with his GF. He is so upset that he decides to take a trip to some other city to avoid meeting her. He will trav 阅读全文
posted @ 2019-08-03 21:53 black_hole6 阅读(206) 评论(0) 推荐(0) 编辑
摘要:很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。 在每个测试的第一行, 阅读全文
posted @ 2019-08-02 11:58 black_hole6 阅读(241) 评论(0) 推荐(0) 编辑
摘要:Problem Description There are n stones numbered from 1 to n.The weight of the i-th stone is i kilograms. We divide the stones into k groups.Each group 阅读全文
posted @ 2019-08-01 09:40 black_hole6 阅读(402) 评论(0) 推荐(0) 编辑

欢迎阅读『2019 年 8月 随笔档案』
点击右上角即可分享
微信分享提示