自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 问答 (1)
  • 收藏
  • 关注

原创 算法竞赛题目分享(持续更新)

文章目录前言一、开发环境二、题目1.NOI CCF 10412.NOI CCF 1042前言高中生自学算法心得与源代码分享一、开发环境Visual Studio 2019二、题目1.NOI CCF 10412.NOI CCF 1042题目描述 某小学最近得到了一笔赞助,打算拿出其中一部分为学习成绩优秀的前5名学生发奖学金。期末,每个学生都有3门课的成绩:语文、数学、英语。先按总分从高到低排序,如果两个同学总分相同,再按语文成绩从高到低排序,如果两个同学总分和语文成绩都相同,那么规定学

2021-01-10 12:15:13 1757 2

原创 1031. 等腰三角形 (Standard IO)

#include<iostream>using namespace std;int main() { int n; cin >> n; for (int i = 0; i < n; i++) { int k = n - i - 1; for (int i = 0; i < k; i++)cout << " "; int x = i * 2 + 1; for (int i = 0; i < x; i++)cout <<

2021-01-02 15:00:16 144 1

原创 1016. 计算天数 (Standard IO)

#include <iostream>using namespace std;int year, month;bool is_run(int year) { if (year % 100 == 0) { if (year % 400 == 0)return true; else return false; } else if (year % 4 == 0)return true; else return false;}int main() { cin >>

2020-12-20 12:09:44 153 1

原创 1015. 星期几 (Standard IO)

#include<stdio.h>int main(){ int day; scanf("%d", &day); if (day == 1)printf("Monday"); else if (day == 2)printf("Tuesday"); else if (day == 3)printf("Wednesday"); else if (day == 4)printf("Thursday"); else if (day == 5)printf("Friday");

2020-10-02 09:32:20 118

原创 1014. 写评语 (Standard IO)

#include<stdio.h>int main(){ int score; scanf("%d", &score); if (score >= 90)printf("Excellent"); else if (score >= 80)printf("Good"); else if (score >= 60)printf("Pass"); else printf("Fail"); return 0;}

2020-10-02 09:23:12 422

原创 1013. 识别三角形 (Standard IO)

#include<stdio.h>int main(){ int a, b, c, a2, b2, c2; scanf("%d %d %d", &a, &b, &c); a2 = a * a; b2 = b * b; c2 = c * c; if (a + b <= c || a + c <= b || b + c <= a)printf("NO"); else { if (a == b && b == c)prin

2020-10-02 09:16:19 142

原创 1012. 变换密码 (Standard IO)

#include<stdio.h>#include<ctype.h>int main(){int n, a, b;scanf("%d", &n);a = n % 123;b = n % 91;if (islower(a)) putchar(a);else if (isupper(b)) putchar(b);else printf("*");return 0;}

2020-10-02 08:32:13 158

原创 1011. 正方形 (Standard IO)

#include<stdio.h>int main(){ double a, b; scanf("%lf %lf", &a, &b); if (a < -1.0 || a > 1.0 || b < -1.0 || b > 1.0) printf("No"); else printf("Yes"); return 0;}

2020-10-02 08:31:56 120

原创 1010. 邮寄包裹 (Standard IO)

#include<stdio.h>#include<math.h>int main(){ double wei, total = 0; scanf("%lf", &wei); if (wei > 30)printf("Fail"); else { if (wei <= 10) total = wei * 0.80; else if (wei <= 20) total = 8.00 + (wei - 10) * 0.75; else

2020-10-01 14:27:22 380

原创 1009. 分配任务 (Standard IO)

#include<stdio.h>#include<math.h>int main(){ int a, b; scanf("%d %d", &a, &b); if (a + b < 10) { printf("water"); } else { if (a > b)printf("tree"); else printf("tea"); } return 0;}

2020-10-01 13:39:35 258

原创 1008. 水仙花数 (Standard IO)

#include<stdio.h>#include<math.h>int main(){ int n, a, b, c; scanf("%d", &n); a = n / 100; a = a * a * a; b = n / 10 % 10; b = b * b * b; c = n % 10; c = c * c * c; if (n == a + b + c)printf("YES"); else printf("NO"); return 0

2020-10-01 13:31:06 81

原创 1007. 计算余数 (Standard IO)

#include<stdio.h>#include<math.h>int main(){ double a, b; scanf("%lf %lf", &a, &b); printf("%.2lf\n", a - floor(a / b) * b); return 0;}

2020-10-01 13:12:15 108

原创 1006. 捡石头 (Standard IO)

#include<stdio.h>#include<math.h>int main(){ int a, b, c; scanf("%d %d %d", &a, &b, &c); printf("%d\n", 20 - a - b - c); return 0;}

2020-10-01 13:07:58 301

原创 1005. 存款收益 (Standard IO)

#include<stdio.h>#include<math.h>int main(){ double R, X, P, Y = 0, num = 1; scanf("%lf %lf %lf", &R, &X, &P); for ( int i = 0; i < P; i++) { num *= (100 + R) / 100.0; } Y = num * X; printf("%.2lf\n", Y); return 0;

2020-10-01 13:03:00 107

原创 1004. 填充矩形 (Standard IO)

#include<stdio.h>#include<math.h>int main(){ double m, n, a, num; scanf("%lf %lf %lf", &m, &n, &a); num = floor((m / a)) * floor((n / a)); printf("%.0lf\n", num); return 0;}

2020-10-01 12:32:31 134

原创 1003. 猜数游戏 (Standard IO)

#include<stdio.h>#include<math.h>int main(){ int n; scanf("%d", &n); n = n * 1001; n = n / 7 / 11 / 13; printf("%d\n", n); return 0;}

2020-10-01 12:23:18 187

原创 1002. 三角形 (Standard IO)

#include<stdio.h>#include<math.h>int main(){ double a, b, c, S; scanf("%lf %lf %lf", &a, &b, &c); S = sqrt((a + b + c) * (a + b - c) * (a + c - b) * (b + c - a)) / 4; printf("%.4lf\n", S); return 0;}

2020-10-01 12:18:22 115

原创 1001. 温度转换 (Standard IO)

#include<stdio.h>#include<math.h>int main(){ double F, C; scanf("%lf", &F); C = (F - 32) * 5 / 9; printf("%.4lf\n", C); return 0;}

2020-10-01 12:05:53 125

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除