
By myself
cx.
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
杭电1070
请告诉我哪里错了?杭电1070题 #include<stdio.h> #include<math.h> struct milk { char name[100]; int price; int vol; }; int main() { int n; scanf("%d",&n); while(n–) { struct milk m[原创 2018-11-22 17:00:48 · 254 阅读 · 0 评论 -
杭电4500
哪错了,请告诉我 #include<stdio.h> #include<math.h> struct man { int q;//位置原始值 int x; //位置魅力值 int s;//位置原始值符号,正为1,负为-1 }; int main() { int row,col; struct man m[20][20]; while(scanf("%d%d",&ro...原创 2018-11-22 17:54:18 · 152 阅读 · 0 评论 -
杭电2025
#include<stdio.h> #include<string.h> #define LEN (int)strlen(str) int main() { char str[1005]; while(~scanf("%s",str)){ char max = ‘A’; for(int i=0;i<LEN;i++) if(str[i]>max) max = st...原创 2018-11-24 16:39:13 · 157 阅读 · 0 评论 -
杭电2021
正确做法 #include<stdio.h> int main() { int n; while(scanf("%d",&n)!=EOF&&n) { int count=0; int a; while(n–) { scanf("%d",&a); count+=a/100+a%100/50+a%100%50/10+a%100%50%10/5+a%100%5...原创 2018-11-24 18:14:09 · 330 阅读 · 0 评论 -
杭电2070
(1)当使用unsigned __int64时,输出为"I64u"。 使用__int64时,输出为"I64d"。 (2)那遇到比40亿要大的数怎么办呢? 这时就要用到C++的64位扩展了。既声明为__int64. int和long都只能表示40亿一下的数值。 #include <stdio.h> int main() { int n,i; __int64 s[51]; while(sc...原创 2018-11-29 16:34:16 · 231 阅读 · 0 评论 -
杭电1069
这题只做到排序,后面的变量,如全局变量的值还没做完。因为本题需要用到动态规划,还没进行进一步的学习。暂置。 #include<stdio.h> struct block { int length; int width; int height; }; int main() { int n; int count=0; while(scanf("%d",&n)!=EOF&&a...原创 2018-11-28 16:00:16 · 216 阅读 · 0 评论 -
杭电2030
这是一个值得学习的算法 1.(m+1)/2用于统计汉字的个数 2.(s[i]<32||s[i]>126)用于判断是否为汉字 此处存在一疑问,s[i]读取的是什么? #include<stdio.h> #include<string.h> int main() { char s[1000]; int i,j,n,m; scanf("%d",&n); get...原创 2018-11-28 16:11:22 · 173 阅读 · 0 评论