题意: n项工作 1~n  工时s[i] ~e[i], 工时有覆盖的工作不能被同一台机器同时操作, 问完成所有工作的最少机器数 思路:前缀差分和 e.g. a            2 3 4              machine 2 b         1 2 3                 machine1 c                     5 6 7     machine2    a做完后空闲做c d               3 4 5 6 7     machin…
链接:https://www.nowcoder.com/acm/contest/125/A来源:牛客网 Tony and Macle are good friends. One day they joined a birthday party together. Fortunately, they got the opportunity to have dinner with the princess, but only one person had the chance. So they de…
链接:https://www.nowcoder.com/acm/contest/89/A 来源:牛客网 1.题目描述 The Great Wall story of Meng Jiangnv’s Bitter Weeping happened during the Qin Dynasty (221BC- 206BC). Meng jiangnv was a beauty in the Qin Dynasty, and she lived happily with her husband. At…
“\t\v\\0”长度=4:\0:字符串结束符:\\0:\将\0进行了转义,所以\0是两个字符 类的友元函数的访问权限跟类内部的方法相同,但是友元函数不属于本类的对象,一般它是另一个类的成员函数,不能通过本类的this指针进行访问. node是一个指针,它指向的是const char类型,node可以指向任何标识符,但他指向的内容是不能改变的 short类型占2个字节,16位,范围是-65536~65535…
题目描述 俄罗斯套娃是俄罗斯特产的木制玩具,一般由多个一样图案的空心木娃娃一个套一个组成,最多可达十多个,通常为圆柱形,底部平坦可以直立.颜色有红色,蓝色,绿色,紫色等.最普通的图案是一个穿着俄罗斯民族服装的姑娘,叫做“玛特罗什卡”,这也成为这种娃娃的通称. 彩虹岛也有自己的套娃,不过与俄罗斯套娃有所不同,其组成规则如下:1. 空心木娃娃只有正方体与球两种形状.2. 正方体娃娃与球体娃娃可以相互套,也可以相同形状之间套.3. 当两形状相切的时候使能够互相嵌套的,比如半径为2的球体能套在边长为4的…
题目描述:There are n cities in Byteland, and the ith city has a value ai. The cost of building a bidirectional road between two cities is the sum of their values. Please  calculate the minimum cost of connecting these cities, which means any two cities c…
Coconuts Time Limit: 9000/4500 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 524    Accepted Submission(s): 151 Problem Description TanBig, a friend of Mr. Frog, likes eating very much, so he always has dreams abou…