- 博客(8)
- 收藏
- 关注
原创 HDOJ ACM steps
1.3.4 Fighting for HDU #include<stdio.h> void qsort(int *a,int len)//数组冒泡排序-从小到大(很重要) { int i,j; int temp; for(j=1;j<=len-1;j++) { for(i=0;i<len-j;i++) { if(a[i]>a[i+1]) { temp=a[i]; a[i]=a[i+1]; a[i+1]
2022-05-07 18:11:18 92
原创 HDOJ ACM steps
1.3.3 第二小整数 #include<stdio.h> void qsort(int *a,int len)//数组冒泡排序-从小到大 { int i,j; int temp; for(j=1;j<=len-1;j++) { for(i=0;i<len-j;i++) { if(a[i]>a[i+1]) { temp=a[i]; a[i]=a[i+1]; a[i+1]=temp; }
2022-05-07 17:31:58 50
原创 HDOj ACM Steps
AC ME #include <stdio.h> #include <string.h> void init(int *a) { int i; for(i=0;i<26;i++) { a[i]=0; } } int main() { int i,j; char buf[100001]; int str[26]; while(gets(buf))//gets读一整行 { init(str); int len = strlen(buf); for(
2022-05-06 11:28:24 95
原创 HDOJ ACM Steps
Chapter one-section two 1.2.6 GPA #include <stdio.h> int res(char ch) { if(ch=='A') return 4; if(ch=='B') return 3; if(ch=='C') return 2; if(ch=='D') return 1; if(ch=='F') return 0; if(ch==' ') return -2; else return -1;
2022-05-06 10:50:39 46
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人