摘要: 题目描述 小朋友排成一排,老师给他们分苹果。小朋友从左到右标号1..N。有M个老师,每次第i个老师会给第Li个到第Ri个,一共Ri-Li+1个小朋友每人发Ci个苹果。最后老师想知道每个小朋友有多少苹果。 输入 第一行两个整数N、M,表示小朋友个数和老师个数。 接下来M行,每行三个整数Li、Ri、Ci 阅读全文
posted @ 2021-01-27 18:52 荣荣荣荣荣荣 阅读(94) 评论(0) 推荐(0)
摘要: 样例输入 one little two little three little boys 样例输出 5学会将一个字符串分为多个字符串比较。 1 #include <stdio.h> 2 #include <string.h> 3 4 char a[10100]; 5 int f(){ 6 int i 阅读全文
posted @ 2021-01-27 14:48 荣荣荣荣荣荣 阅读(99) 评论(0) 推荐(0)