”HDOJ“ 的搜索结果

     HDOJ2098 素数打表 ac代码如下` #include <iostream> #include <cmath> #include <cstdio> #include <stack> #include <string> using namespace std; #define maxn 10050 int vis...

HDOJ 1094

标签:   c++

     A+B for Input-Output Practice (VI) Problem Description Your task is to calculate the sum of some integers. Input Input contains multiple test cases, and one case one line. Each case starts with an ...

HDOJ 2004

标签:   c++

     成绩转换 Problem Description 输入一个百分制的成绩t,将其转换成对应的等级,具体转换规则如下: 90~100为A; 80~89为B; 70~79为C; 60~69为D;...输入数据有多组,每组占一行,由一个整数组成。...如果输入数据不在0~100...

     这道题估计是HDOJ里最简单的了,不亦要挑战的是怎样用最短的代码AC它。 看了下HDOJ支持的编程语言,有C、C++、Java、Pascal和C#,对比了下,在这个场景C语言应该是最短的了。 那么,为了方便测试,直接用在线的...

     题目:进制转换 #include<iostream> #include<cstring> #include<sstream> #include<string> #include<algorithm&...map&amp

     统计元音 Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 139448Accepted Submission(s): 52420 Problem Description 统计每个元音字母在字符串中出现...

     #include<bits\stdc++.h> #include<math.h> using namespace std; int main(void) { int n,m; double x; double a; scanf("%d",&n); while(n--) { scanf("%d",&... retu

HDOJ 1091

标签:   c++

     A+B for Input-Output Practice (III) Problem Description Your task is to Calculate a + b. Input Input contains multiple test cases. Each test case contains a pair of integers a and b, one pair of ...

     using namespace std; int main(void) { int x; while(scanf("%d",&x)!=EOF) { if(((x+1)%8==3)||((x+1)%8==7)) printf("yes\n"); else printf("no\n"); } return 0;...在这里插入代码片

HDOJ 2036

标签:   c++

     HDOJ 2036 解题思路 关键点在于任意多边形面积的计算公式 【国际数学竞赛】任意多边形面积计算公式 注意输出格式。 注意最后的xn与yn还需要与开头的x1与y1进行一次计算。 这里我的abs的位置还抱有疑问,但是给了AC。...

HDOJ 1025 DP

标签:   dp  HDOJ

     题意:河两边各n座城市,修路,不能交叉,最多几条。 这种题目难还是怎么把模型转换,比如这道题。可以把所要连接的城市当做比较值,然后以初始点当下标。也就是LIS。 比如例子 3 1 2 ...我们就可以当做是长度3的...

     #include using namespace std; int main(void) {  int n;  char s[100];  cin >> n;  getchar();  for (int j = 0; j  {  if (j > 0) cout  int a[5] = { 0, 0, 0, 0

HDOJ 1089

标签:   c++

     A+B for Input-Output Practice (I) Problem Description Your task is to Calculate a + b. Too easy?! Of course! I specially designed the problem for acm beginners. You must have found that some problems ...

HDOJ 1092

标签:   c++

     A+B for Input-Output Practice (IV) Problem Description Your task is to Calculate the sum of some integers. Input Input contains multiple test cases. Each test case contains a integer N, and then N ...

HDOJ 1095

标签:   c++

     A+B for Input-Output Practice (VII) Problem Description Your task is to Calculate a + b. Input The input will consist of a series of pairs of integers a and b, separated by a space, one pair of ...

     #include<bits/stdc++.h> using namespace std; typedef long long ll; ll ans[100000]; int main(void) { ans[1]=2; for(int i=2;i<11111;i++) { ans[i]=ans[i-1]+4*(i-1)+1;... pri

     A + B Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1018050 Accepted Submission(s): 301819 Problem Description Calculate A + B. ...

     求给定的多边形面积,首先可以分割为数个三角形,分别求面积,最后累加即可。 对上图而言,多边形的面积就是:(S:1,a:2,b:3,c:4,d:5,e:6) S(1->6) = S(1,2,3) + S(1,3,4) + S(1,4,5) + S(1,5,6)(对凸...

10  
9  
8  
7  
6  
5  
4  
3  
2  
1