NWPUACM
浔桥
这个作者很懒,什么都没留下…
展开
-
UVALive7198 Tall orders(二分,线积分)
You have been charged with evaluating the safety of power cables passing over train tracks. Owing to the recent purchase of the new Macho 10000 trains, the questions has been raised as to whether the ...原创 2018-08-20 23:44:20 · 242 阅读 · 0 评论 -
UVALive7196 Find x
You have to implement a simple equation solver to evaluate expressions consisting of numbers, variables,and addition/subtraction operators.In the past, this type of problem was called a “find x” pro...原创 2018-08-20 23:14:11 · 147 阅读 · 0 评论 -
HDU6222 Heron and His Triangle(大数,找规律)
A triangle is a Heron’s triangle if it satisfies that the side lengths of it are consecutive integers t−1, t, t+ 1 and thatits area is an integer. Now, for given n you need to find a Heron’s...原创 2018-08-30 23:25:11 · 328 阅读 · 0 评论 -
Gym101669A Concerts(dp,字符串)
Input File: A.inOutput File: standard outputTime Limit: 0.3 seconds (C/C++)Memory Limit: 128 megabytes John enjoys listening to several bands, which we shall denote using A through Z. Hewants ...原创 2018-08-26 17:40:30 · 541 阅读 · 0 评论 -
ZOJ1203 Swordfish(Kruskal、Prim算法,并查集)
There exists a world within our world A world beneath what we call cyberspace. A world protected by firewalls, passwords and the most advanced security systems. In this world we hide our deepest...原创 2018-08-16 17:12:21 · 168 阅读 · 0 评论 -
HDU5025 Saving Tang Monk(BFS)
《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. It was written by Wu Cheng'en during the Ming Dynasty. In this novel, Monkey King Sun Wukong, pig ...原创 2018-08-15 11:37:07 · 226 阅读 · 0 评论 -
[NWPU2018]一套水题 2018.8.11测试
https://vjudge.net/contest/245776#overview A - 这是一套简单题输出n甁药水一次k种时最坏情况下最少死去的兔子数量。分别考虑n=1, k=1, n==k, n%k==0或1,其他情况,输出分别为0, n-1, -1, n/k, n/k+1.注意每种药水都可以重复使用。 B - 有多简单呢?计算26个字母分别出现的次数,然后根...原创 2018-08-11 22:52:16 · 166 阅读 · 0 评论 -
[NWPU][2018暑假作业][通用版]四、学算法啦啦啦——dp,并查集等 [Cloned]
https://vjudge.net/contest/235901 A - 数字三角形刚开始直接给三角形的位置编号,用map存起来然后dfs(思维没有转变过来,还停留在上一版。。),然后超时了。。于是我打开提交情况,发现别人的代码比我的短一半多。。= =于是换成dp,AC。 B - LITTLE SHOP OF FLOWERSdp。花束的数量<=花瓶数量,并且花...原创 2018-08-06 00:44:35 · 161 阅读 · 0 评论 -
[NWPU][2018暑假作业][通用版]二、stl ,模拟,贪心等 [Cloned]
https://vjudge.net/contest/235899 A - stl 的 map这道题主要还是熟悉map的相关操作……鼓捣了好久才搞明白map是咋回事orz。题目本身很简单。另,我要放弃C投奔C++了…string和cin cout好用。 B - stl 的 map要求是把火星文转换为英文,所以定义map的时候把火星文作为key,英文作为value。用g...原创 2018-07-23 14:45:58 · 235 阅读 · 0 评论 -
[NWPU][2018暑假作业][通用版]三、搜索和二分 [Cloned]
https://vjudge.net/contest/235900 A - 贪心定义一个结构体,保存牛的序号、用的位置、开始和结束的时间。然后根据开始时间从小到大排序,相等的话用结束时间从小到大排序。然后定义一个优先队列,排序方法相同,每次出来结束时间最小的,结束时间相同就出来开始时间最小的,第一个牛用第一个位置并进队列。然后比较队头的结束时间和下一个的开始时间,如果小于,就共用...原创 2018-07-27 17:08:37 · 190 阅读 · 0 评论 -
[NWPU][2018暑假作业][通用版]一、热身 [Cloned]
https://vjudge.net/contest/235898 A - The 3n + 1 problem题目要求输出:输入的两个值、两个值中特定算法的最大周期长度。最大周期长度比较好算,一个函数递归就能解决,然后题上有一个小坑(算是坑吧),就是输入的m和n的值并没有保证m<n。考虑到了这个就没有问题了。 B - Candy Sharing Game直接重...原创 2018-07-15 13:45:37 · 338 阅读 · 0 评论 -
LOJ#10001 种树(贪心)
题解:刚开始想用优先队列做……就是每一条建议取重叠最多的几个点种树,然后SE了= =数据比较大 = =这题有个比较迷的地方……就是如果用while(cin>>n>>h)输入会WA……打开测试数据看了下发现有几组数据这样输入的话会有多组输出……= =另外就是点的数量是n,范围在30000,建议的范围在5000.弄混了好多次- -按照右端点从小到大排序,每次都尽...原创 2018-09-02 00:08:29 · 248 阅读 · 0 评论