摘要: 注意,这道题思路可以把长宽确定好,短的放前面即可,然后用pair保存并排序,如果第一个和第二个,第三个和第四个,第五个和第六个相同且第一个的x和第二个的x,第一个的y和第三个的x,第二个的y和第三个的y相同才行,因为长方体三条边abc,设a<b<c,那么(a,b)排在最前面(a,c)边第二,(b,c 阅读全文
posted @ 2020-05-13 21:36 funforever 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 这道题其实要明白一个特点(见绿书22页)但某一次a%b如果与之前出现的a%b值一样(我们设该值为X,即设a%b==X),那么X除以b的值也是和第一次的a%b除以b的值一样,其余数也一样,于是乎,之后的值和余数也是这样,如此,就产生了循环(见下图) #include <bits/stdc++.h> u 阅读全文
posted @ 2020-05-13 21:25 funforever 阅读(123) 评论(0) 推荐(0) 编辑
摘要: You are given two integers aa and bb. You can perform a sequence of operations: during the first operation you choose one of these numbers and increas 阅读全文
posted @ 2020-04-26 10:01 funforever 阅读(146) 评论(0) 推荐(0) 编辑
摘要: F - Select Half Time Limit: 2 sec / Memory Limit: 1024 MB Score : 600 points Problem Statement Given is an integer sequence A1,...,AN of length N. We 阅读全文
posted @ 2020-04-22 18:08 funforever 阅读(345) 评论(0) 推荐(0) 编辑
摘要: ACM has bought a new crane (crane -- jeřáb) . The crane consists of n segments of various lengths, connected by flexible joints. The end of the i-th s 阅读全文
posted @ 2020-03-26 16:21 funforever 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Simon is doing a physics experiment with N identical balls with the same radius of R centimeters. Before the experiment, all N balls are fastened with 阅读全文
posted @ 2020-03-18 19:15 funforever 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 答案: select sname from s where not exists (select * from c where teacher = '程军' and not exists (select * from sc where c.cno = sc.cno and sc.sno = s 阅读全文
posted @ 2020-03-09 22:01 funforever 阅读(1022) 评论(0) 推荐(0) 编辑
摘要: It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has dec 阅读全文
posted @ 2020-03-09 15:39 funforever 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 买不到的数目 Description 小明开了一家糖果店。他别出心裁:把水果糖包成4颗一包和7颗一包的两种。糖果不能拆包卖。 小朋友来买糖的时候,他就用这两种包装来组合。当然有些糖果数目是无法组合出来的,比如要买 10 颗糖。 你可以用计算机测试一下,在这种包装情况下,最大不能买到的数量是17。大于 阅读全文
posted @ 2020-03-06 17:02 funforever 阅读(274) 评论(0) 推荐(0) 编辑
摘要: Signals of most probably extra-terrestrial origin have been received and digitalized by The Aeronautic and Space Administration (that must be going th 阅读全文
posted @ 2020-03-03 09:52 funforever 阅读(210) 评论(0) 推荐(0) 编辑