An easy problem Time Limit:3000MS Memory Limit:32768KB bit IO Format:%Id & %Iu Submit Status Description When Teddy was a child , he was always
转载
2016-11-15 08:47:00
70阅读
2评论
#include #include using namespace std; int f[30], F[30]; int main() { char c; int n, m, p; cin >> n; for(int i = 1; i > c >> m; if(c >= 'a' && c = 'A' && c <= 'Z') p = F[c - 'A' + 1];...
转载
2019-08-04 17:27:00
109阅读
2评论
An easy problem
原创
2023-05-05 18:14:51
37阅读
A problem is easy时间限制:1000ms | 内存限制:65535KB难度:3描述When Teddy was a child , he was always thinking about some simple math problems ,such as “What it’s 1...
转载
2014-04-05 14:11:00
97阅读
2评论
链接:https://ac.nowcoder.com/acm/contest/338/E来源:牛客网 Zghh likes number, but he doesn't like writing problem description. So he will just give you a prob
原创
2021-08-03 09:12:39
399阅读
原题网址:1223:An Easy Problem参考代码#include<bits/stdc++.h>using namespace std;int main(){ int n; while(cin>>n && n!=0){ int ncount=0; int temp=n; while(temp!=0){//用求二进制的方法
原创
2021-11-07 22:44:09
728阅读
An Easy Problem 1 #include<iostream> 2 using namespace std; 3 4 int cnt(int n){ 5 int sum=0; 6 while(n){ 7 if(n%2)sum++; 8 n/=2; 9 } 10 return sum; 11 ...
转载
2021-08-10 16:23:00
149阅读
DescriptionHave you heard the fact "The base of every normal number system is 10" ? Of course, I am not talking about number systems like Stern Brockot Number System. This problem has nothing to do wi
原创
2022-04-20 10:00:04
79阅读
点击打开链接
一开始真以为是水题 然后WA了一天
两线段所在直线的关系有平行与相交
首先平行绝对不可以 去掉平行时顺带去掉了重叠或部分重叠这一情况
若相交且可以盛水 则四个端点中必有两个在交点上方
分类讨论
1. 两点在交点异侧
这种情况下必然可以盛水 直接计算(详见代码)
2. 两点在交
原创
2022-06-15 21:51:38
86阅读
An easy problemTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32
原创
2023-02-20 08:36:00
29阅读
Problem Description we define f(A) = 1, f(a) = -1, f(B) = 2, f(b) = -2, … f(Z) = 26, f(z) = -26; Give you a letter x and a number y , you should output the result of y+f(x).Input On the first line,
原创
2022-05-14 11:40:52
85阅读
POJ_2826
这个题目暂且不讨论精度的问题了,因为discuss上面有相当一部分人在吐槽精度,所以如果你A不掉的话可以考虑discuss上面的一些建议。
这个题目确实要考虑到比较多的情况,我们不妨一一分析。
首先,如果两个线段都没交点了,肯定存不了水,因此我们不妨先剔除掉不相交的情况。为了能简化后面叉积的讨论,我们可以先将平行的情况特判一下。
接下来,我们就讨论
转载
2012-02-11 00:34:00
44阅读
2评论
题目传送门题意:一个计算器,两种操作,乘上x,或者除掉之前的某个x,结果取模输出分析:因为取模不支持除法,然后比赛时想到用逆元,结果发现MOD需要与b互质,结果一直苦苦寻找求逆元的其它方法。后来队友用暴力方法竟然水过,具体操作是记录每次乘的x,如果除的话,将对应的x 改为1,然后一个一个乘。当然正解...
转载
2015-09-30 14:06:00
66阅读
2评论
An Easy Problem?!Time Limit:1000MSMemory Limit:65536KTotal Submissions:7837Accepted:1145DescriptionIt's raining outside. Farmer Johnson's bull Ben wants some rain to water his flowers. Ben nails two wooden boards on the wall of his barn. Shown in the pictures below, the two boards on the wal
转载
2013-07-16 01:12:00
58阅读
2评论
题目:http://acm.hdu.edu.cn/showproblem.php?pid=2055#include #include #include using namespace std;int main(){ in
原创
2022-08-22 17:49:54
227阅读
题目链接:Easy Problem
原创
2022-08-31 10:37:31
51阅读
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3521Time Limit: 24000/12000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionWe define e^Aas following:Where A is a ...
原创
2021-07-14 10:42:43
114阅读
链接繁琐细节题。1、线段无交点时,ans=0;2、如图 假设过p3.y的水平线与p1p2相交因为雨是垂直下落的,左图的情况是无法收集到雨水的,而这种情况有一种简便的判定方式 cross(p1-p2,p3-p4)与cross((p1+(0,1))-p1,p1,p3)同号对于右边的,阴影部分即为ans,...
转载
2014-08-01 22:08:00
16阅读
2评论
水题 当时应该是因为被英文吓到了#incl...
转载
2016-04-04 07:27:00
36阅读
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3521Time Limit: 24000/12000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Problem DescriptionWe define e^Aas following:Where A is a ...
原创
2022-02-03 15:06:24
57阅读