- 博客(63)
- 收藏
- 关注
原创 C语言 用结构体定义学生信息,用冒泡法按照成绩的高低输出各学生的信息
#include<stdio.h>#define N 5struct student { int num; char name[20]; float score;}stu[N]={ 10101,"lili",90,10102,"mimi",86,10103,"weiwei",91,10104,"huhu",89,10105,"daidai",93};int main(){ struct student temp; for(int i=0;i&l...
2022-05-13 08:59:55
710
原创 奖学金(洛谷)
#include<bits/stdc++.h>using namespace std;struct stu{int cN;//语文int mN;//数学int eN;//英语int sN;//序号int sum;}; stu a[310];bool cmp(stu a,stu b){if(a.sum>b.sum) return 1;else if(a.sum<b.sum) return 0;...
2022-05-10 16:24:18
199
原创 弹珠游戏(洛谷)
#include<iostream>using namespace std;int ma[1010][1010];int main(){int n, maxn = 0, flag = 0;cin >> n;for(int i = 0; i < n; i++) for(int j = 0; j < n; j++) cin >> ma[i][j];for(int i = 0; i < n; i++) for(int j = 0...
2022-05-05 13:59:01
1159
原创 P1320 压缩技术(续集版
#include <stdio.h>#include <string.h>int flag=1;char s[100];int main(){int cnt=0,num=0,sum=0;while( scanf("%s",s) ){ int len=strlen(s); if(flag) { printf("%d ",len); flag=0; } for(int i=0;i<len;i++) { if(s[i]=...
2022-05-05 13:45:21
182
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅
1