当前位置: 首页 > news >正文

沂水网站开发第三方平台推广

沂水网站开发,第三方平台推广,单页产品销售网站如何做推广,谷歌做网站文章目录题目描述题意#xff1a;题解#xff1a;传送时间限制#xff1a;C/C 2秒#xff0c;其他语言4秒 空间限制#xff1a;C/C 131072K#xff0c;其他语言262144K 64bit IO Format: %lld 题目描述 Listening to the music is relax, but for obsessive(强迫症), it … 文章目录题目描述题意题解传送时间限制C/C 2秒其他语言4秒 空间限制C/C 131072K其他语言262144K 64bit IO Format: %lld 题目描述 Listening to the music is relax, but for obsessive(强迫症), it may be unbearable. HH is an obsessive, he only start to listen to music at 12:00:00, and he will never stop unless the song he is listening ends at integral points (both minute and second are 0 ), that is, he can stop listen at 13:00:00 or 14:00:00,but he can’t stop at 13:01:03 or 13:01:00, since 13:01:03 and 13:0100 are not an integer hour time. Now give you the length of some songs, tell HH whether it’s possible to choose some songs so he can stop listen at an integral point, or tell him it’s impossible. Every song can be chosen at most once. 输入描述: The first line contains an positive integer T(1≤T≤60), represents there are T test cases. For each test case: The first line contains an integer n(1≤n≤105), indicating there are n songs. The second line contains n integers a1,a2…an (1≤ai≤109 ), the ith integer ai indicates the ith song lasts ai seconds. 输出描述: For each test case, output one line “YES” (without quotes) if HH is possible to stop listen at an integral point, and “NO” (without quotes) otherwise. 示例1 输入 3 3 2000 1000 3000 3 2000 3000 1600 2 5400 1800输出 NO YES YES说明 In the first example it’s impossible to stop at an integral point. In the second example if we choose the first and the third songs, they cost 3600 seconds in total, so HH can stop at 13:00:00 In the third example if we choose the first and the second songs, they cost 7200 seconds in total, so HH can stop at 14:00:00 题意 给你n个数这些数自由组合能不能凑出3600的倍数 题解 我一开始想到的是前缀和后来感觉dp最直接 dp[x]1表示能组成x这个数 dp 0表示组不了 cnt是中间数组暂时存储本轮的数值 因为求能不能组成3600可以用mod3600的倍数mod后都是0直接求dp[0]是否等于1 每读取一个a就把a与之前所求的值进行相加存在cnt里然后再给dp[]cnt就是工具人 #includebits/stdc.h #define mem(a) memset(a,0,sizeof(a))using namespace std; const int maxn1e53; bool dp[maxn],cnt[maxn]; const int mod3600; int main() {int t,n;scanf(%d,t);while(t--){mem(dp);mem(cnt);scanf(%d,n);for(int i1;in;i){int a;cina;a%3600;if(!dp[0]){for(int j0;j3600;j){if(dp[j]0||j0){cnt[(aj)%3600]1;}}for(int j0;j3600;j){if(cnt[j])dp[j]1;if(cnt[j]1)cnt[j]0;}// mem(cnt);}}if(!dp[0])coutNOendl;else coutYESendl;}return 0; }有个很玄学的地方我把读入n放在两个mem之前数据就过了一半放后面就ac了不知道为什么 看来卡时间卡的太紧了笑哭
http://www.pierceye.com/news/235330/

相关文章:

  • 机关网站建设建议云南响应式网站建设
  • 对网站开发语言的统计杭州网站设计公司有哪些
  • 不会代码 怎么做网站兴义网络推广
  • 综合电子商务型企业网站怎么做网站的网盘
  • ucenter使用自己做的网站房地产新闻时事热点
  • 企业网站备案 过户电商运营视频教程
  • 做网站运营这工作怎么样北京网站优化价格
  • 河南专业网站建设网站怎么做高权重
  • 国内大型电子网站建设做网站时怎么透明化
  • 微应用和微网站的区别手机网站开发的目的
  • 网站ico开一个网站建设公司好
  • wordpress中文站cn外贸网站怎么换域名
  • 淘宝客怎么做直播网站吗学校网站建设发展概况分析
  • 广州网站外贸推广建筑师必看的16部纪录片
  • 深圳网站建设平台网站右侧浮动广告
  • 中英文网站源码浙江东南网架公司
  • 个人备案网站放什么资料培训
  • html做企业门户网站提供设计的网站
  • 成都三合一网站建设成年s8视频加密线路
  • 做网站购买服务器如何优化网络
  • 企业公司网站 北京怎样用前端知识制作企业网站
  • 精湛的赣州网站建设襄阳哪里有做网站的
  • 拿了网赌代理后怎样做自己的网站河南最新消息今天
  • 北京最大的网站开发公司中山市企业网站seo营销工具
  • 苏州营销型网站建设方案哪些网站做的比较好的
  • 淘宝上买的建设网站能退款吗app怎么查网站备案
  • 电子商务网站开发与设计报告专业网站建设公司兴田德润怎么样
  • 如何建立p2p网站win2003怎么做网站
  • 免费网页设计制作网站建筑公司愿景口号大全
  • 个人可以做网站维护吗专业团队电脑壁纸