![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM
无
Zoran_卓
这个作者很懒,什么都没留下…
展开
-
Drazil and Date 1周H
Someday, Drazil wanted to go on date with Varda. Drazil and Varda live on Cartesian plane. Drazil’s home is located in point (0, 0) and Varda’s home is located in point (a, b). In each step, he can mo...转载 2018-12-14 22:35:11 · 113 阅读 · 0 评论 -
三角形HDU - 2039 1周赛D
给定三条边,请你判断一下能不能组成一个三角形。 Input 输入数据第一行包含一个数M,接下有M行,每行一个实例,包含三个正数A,B,C。其中A,B,C <1000; Output 对于每个测试实例,如果三条边长A,B,C能组成三角形的话,输出YES,否则NO。 这道题看似很容易,但一但不仔细看题,你就永远AC不了,题目中并没有要求三条边的整数,所以一旦用了int类型,就错了,要用doubl...原创 2018-12-14 22:06:28 · 143 阅读 · 0 评论 -
汉诺塔V 1周赛B
用1,2,…,n表示n个盘子,称为1号盘,2号盘,…。号数大盘子就大。经典的汉诺塔问 题经常作为一个递归的经典例题存在。可能有人并不知道汉诺塔问题的典故。汉诺塔来源于 印度传说的一个故事,上帝创造世界时作了三根金刚石柱子,在一根柱子上从下往上按大小 顺序摞着64片黄金圆盘。上帝命令婆罗门把圆盘从下面开始按大小顺序重新摆放在另一根柱 子上。并且规定,在小圆盘上不能放大圆盘,在三根柱子之间一回只能移动...原创 2018-12-14 21:53:54 · 119 阅读 · 0 评论 -
HDU-2101
#include &lt;iostream&gt; using namespace std; int main() { int a, b; while (cin &gt;&gt; a &gt;&gt; b) { if ((a + b) % 86 == 0) cout &lt;&lt; &原创 2018-12-07 19:34:59 · 96 阅读 · 0 评论 -
hdu-2002
#include &lt;iostream&gt; #include &lt;iomanip&gt; using namespace std; #define PI 3.1415927 int main() { double a,b; while (cin &gt;&gt; a) { b= 4*PI*a*a*a/3;原创 2018-12-07 19:31:39 · 151 阅读 · 0 评论 -
hdu-2000
这道题我定义了一个swap函数,这样进行交换就很方便了。但要注意的是要用引用参数或者指针参数,否则最后输出的会没有变化。 #include &lt;iostream&gt; using namespace std; void swap(char &amp;a,char&amp;b) { char c; c= a; a = b; b = c; } int m...原创 2018-12-07 19:24:21 · 209 阅读 · 0 评论 -
hdu-1000
这道题唯一的难点可能就是while (cin >> a >> b)这一循环语句了 #include <iostream> using namespace std; int main() { int a, b; while (cin >> a >> b) cout<< a+b<&原创 2018-12-07 19:16:40 · 195 阅读 · 0 评论 -
HDU - 2102(A计划)BFS
Problem Description 可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的骑士LJ肯定能将她救出。 现据密探所报,公主被关在一个两层的迷宫里,迷宫的入口是S(0,0,0),公主的位置用...原创 2019-02-13 17:44:40 · 106 阅读 · 0 评论 -
HDU - 1576(A/B)
要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。 Input 数据的第一行是一个T,表示有T组数据。 每组数据有两个数n(0 <= n < 9973)和B(1 <= B <= 10^9)。 Output 对应每组数据输出(A/B)%9973。 题目链接:http://acm.hdu.ed...原创 2019-01-28 23:36:34 · 87 阅读 · 0 评论 -
A + B Again 2周练3
Problem Description There must be many A + B problems in our HDOJ , now a new one is coming. Give you two hexadecimal integers , your task is to calculate the sum of them,and print it in hexadecimal t...原创 2018-12-15 13:05:01 · 97 阅读 · 0 评论 -
A. Watermelon 1周赛1
One hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After that the watermelon was weighed, and the scales showed w ki...原创 2018-12-14 21:39:41 · 168 阅读 · 0 评论 -
CodeForces-266A
CodeForces-266A 这题看似比较复杂,其实不难,题目要求剩下的砖块都不同颜色,那我们每相邻是相同颜色的砖块就拿走一块就行了,即使有很多相邻颜色相同的砖块也一样,最后都会相邻的都不同颜色。 #include &lt;iostream&gt; using namespace std; int main() { int a,j=0; cin&gt;&gt; a; ...原创 2018-12-07 19:12:13 · 115 阅读 · 0 评论 -
CodeForces-467A
CodeForces-467A原创 2018-12-07 19:02:08 · 295 阅读 · 0 评论 -
CodeForces-118A
CodeForces-118A `` `#include #include using namespace std; int main() { char a[120],b[100]; cin &gt;&gt; a; int i, d; for (i = 0; a[i] != ‘\0’; i++) if(a[i] &gt;= ‘A’&amp;&amp;a[i] &lt;= ‘Z’原创 2018-12-07 17:34:42 · 158 阅读 · 0 评论