南阳168

 1 #include<stdio.h>
 2 #include<string.h>
 3 int a[200];
 4 int main()
 5 {
 6     int n,m;
 7     scanf("%d",&n);
 8     while(n--)
 9     {
10         int day,sr,fn;
11         scanf("%d",&m);
12         memset(a,0,sizeof a);
13         while(m--)
14         {
15             scanf("%d%d%d",&day,&sr,&fn);
16             for(int i=sr; i<sr+fn; ++i)
17                 a[i]+=day;
18         }
19         int maxa=a[1];
20         for(int i=2; i<200; ++i)
21             if(maxa<a[i])
22                 maxa=a[i];
23         printf("%d\n",maxa);
24     }
25 }
时间: 2024-10-05 11:14:56

南阳168的相关文章

这是关于FastJson的一个使用Demo,在Java环境下验证的

1 public class User { 2 private int id; 3 private String name; 4 public int getId() { 5 return id; 6 } 7 public void setId(int id) { 8 this.id = id; 9 } 10 public String getName() { 11 return name; 12 } 13 public void setName(String name) { 14 this.n

192.168.0.1/16,1/24;192.168.1.1/16,1/24 &nbsp; IP段的意思

首先来了解一下二进制的转换知识: 二进制数转换成十进制数 二进制的1101转化成十进制1101(2)=1*2^0+0*2^1+1*2^2+1*2^3=1+0+4+8=13转化成十进制要从右到左用二进制的每个数去乘以2的相应次方不过次方要从0开始相反 用十进制的13除以2 每除一下将余数就记在旁边最后按余数从下向上排列就可得到1101十进制转二进制:用2辗转相除至结果为1将余数和最后的1从下向上倒序写 就是结果例如302302/2 = 151 余0151/2 = 75 余175/2 = 37 余1

2015南阳CCPC L - Huatuo&#39;s Medicine 水题

L - Huatuo's Medicine Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 无 Description Huatuo was a famous doctor. He use identical bottles to carry the medicine. There are different types of medicine. Huatuo put medicines into the bottles and chain these b

【南阳OJ分类之语言入门】80题题目+AC代码汇总

声明: 题目部分皆为南阳OJ题目. 代码部分包含AC代码(可能不止一个)和最优代码,大部分都是本人写的,并且大部分为c代码和少部分c++代码and极少java代码,但基本都是c语言知识点,没有太多差别,可能代码有的写的比较丑,毕竟知识有限. 语言入门部分题基本都较为简单,是学习编程入门的很好练习,也是ACM的第一步,入门的最佳方法,望认真对待. 本文由csdn-jtahstu原创,转载请注明出处,欢迎志同道合的朋友一起交流学习.本人QQ:1373758426和csdn博客地址. now begi

运行django项目出现Invalid HTTP_HOST header: &#39;192.168.1.111:8000&#39;. You may need to add &#39;192.168.1.111&#39; to ALLOWED_HOSTS

Request Method: GET Request URL: http://202.201.38.70:8000/angular Django Version: 1.11.3 Exception Type: DisallowedHost Exception Value: Invalid HTTP_HOST header: '202.201.38.70:8000'. You may need to add '202.201.38.70' to ALLOWED_HOSTS. Exception

好记心不如烂笔头,ssh登录 The authenticity of host 192.168.0.xxx can&#39;t be established. 的问题

The authenticity of host 'git.coding.net (123.59.85.184)' can't be established.RSA key fingerprint is SHA256:jok3FH7q5LJ6qvE7iPNehBgXRw51ErE77S0Dn+Vg/Ik.Are you sure you want to continue connecting (yes/no)? 用ssh登录一个机器(换过ip地址),提示输入yes后,屏幕不断出现y,只有按ctr

PB加密专家V6.0.168

PBD加密专家实例!   (PB加密专家/PBD加密专家) PBD加密专家说明: 能对抗目前 PB DeCompiler, shudepb, pbkiller 等反编译工具反编译, 能加密PB5-PB12.5 任意版本的PB程序. 加密后程序与加密前运行结果100%无差别! 附上PB实例源码与加密后的程序,以便测试与验证. 该测试程序为PB9开发,需要测试的朋友请自行将PB9运行DLL拷入对应文件夹中. PBD加密专家工具目前尚未出现在市面上,只能通过线下EMAIL联系作者加密或购买. PB加密

ssh登录 The authenticity of host 192.168.0.xxx can&#39;t be established. 的问题

scp免密码登录:Linux基础 - scp免密码登陆进行远程文件同步 执行scp一直是OK的,某天在本地生成了公钥私钥后,scp到某个IP报以下错误 The authenticity of host '192.168.233.137 (192.168.233.137)' can't be established. ECDSA key fingerprint is SHA256:EsqTfeCJ34DnGV66REuRRPhoFwaLuee5wxFgEAZ8b9k. Are you sure y

南阳理工 题目9:posters(离散化+线段树)

posters 时间限制:1000 ms  |  内存限制:65535 KB 难度:6 描述 The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city council has finally deci