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

响应式网站制作方法自助建站怎么实现的

响应式网站制作方法,自助建站怎么实现的,网站注册设计,asp.net获取网站地址1113: [Poi2008]海报PLA Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 1025 Solved: 679[Submit][Status][Discuss]Description N个矩形,排成一排. 现在希望用尽量少的矩形海报Cover住它们. Input 第一行给出数字N,代表有N个矩形.N在[1,250000] 下面N行,每行给出矩形的长… 1113: [Poi2008]海报PLA Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 1025  Solved: 679[Submit][Status][Discuss] Description N个矩形,排成一排. 现在希望用尽量少的矩形海报Cover住它们. Input 第一行给出数字N,代表有N个矩形.N在[1,250000] 下面N行,每行给出矩形的长与宽.其值在[1,1000000000]2 1/2 Postering Output 最少数量的海报数. Sample Input 5 1 2 1 3 2 2 2 5 1 4 Sample Output 4 HINT Source [Submit][Status][Discuss]   分析 单调栈 代码 1 /*--- Opinion ---*/2 3 #define HEADER4 #define MYMATH5 // #define FILEIO6 // #define FSTREAM7 // #define FREOPEN8 #define FASTREAD9 #define SHORTNAME10 11 ///// HEADER FILE /////12 13 #ifdef HEADER14 15 #include cmath16 #include string17 #include cstdio18 #include cstring19 #include cstdlib20 #include algorithm21 22 #include sstream23 #include fstream24 #include iostream25 26 #include set27 #include map28 #include list29 #include queue30 #include stack31 #include vector32 #include utility33 #include functional34 35 #endif36 37 ///// SHORTNAME /////38 39 #ifdef SHORTNAME40 41 #define LL long long42 #define ll long long43 #define re register44 #define un unsigned45 #define rb re bool46 #define ri re int47 #define ui un int48 #define rl re LL49 #define ul un LL50 51 #define rep (x, y) for (ri i x; i y; i)52 #define repi(x, y) for (ri i x; i y; i)53 #define repj(x, y) for (ri j x; j y; j)54 #define repk(x, y) for (ri k x; k y; k)55 56 #define upto(x) for (ri i 1; i x; i)57 #define dnto(x) for (ri i x; i 1; --i)58 59 #define up(x) for (ri i 1; i x; i)60 #define dn(x) for (ri i x; i 1; --i)61 62 #define put(x) printf(%lld , (LL)x)63 #define putln(x) printf(%lld\n, (LL)x)64 65 #endif66 67 ///// FASTREAD /////68 69 #ifdef FASTREAD70 71 const int FR_lim 10000000;72 73 char *FR_c;74 75 inline void fsetup(FILE *FR_file)76 {77 FR_c new char[FR_lim];78 fread(FR_c, 1, FR_lim, FR_file);79 }80 81 template class T82 inline void fread(T FR_num)83 {84 FR_num 0; rb FR_neg 0;85 86 while (*FR_c 0)87 if (*FR_c -)88 FR_neg ^ true;89 90 while (*FR_c 0)91 FR_num FR_num*10 *FR_c - 0;92 93 if(FR_neg)FR_num -FR_num;94 }95 96 #endif97 98 ///// FILE I/O /////99 100 #ifdef FILEIO 101 102 FILE *FIN fopen(input.txt, r); 103 FILE *FOUT fopen(output.txt, w); 104 105 #ifndef FSTREAM 106 107 #define fin FIN 108 #define fout FOUT 109 110 #endif 111 112 #endif 113 114 ///// FSTREAM ///// 115 116 #ifdef FSTREAM 117 118 std::ifstream fin(input.txt); 119 std::ofstream fout(output.txt); 120 121 #endif 122 123 ///// MYMATH ///// 124 125 #ifdef MYMATH 126 127 #define min(a, b) (a b ? a : b) 128 #define max(a, b) (a b ? a : b) 129 130 #define Min(a, b) a min(a, b) 131 #define Max(a, b) a max(a, b) 132 133 #define abs(x) (x 0 ? -x : x) 134 135 #define sqr(x) ((x)*(x)) 136 137 #endif 138 139 ///// _MAIN_ ///// 140 141 void _main_(void); 142 143 signed main(void) 144 { 145 146 #ifdef FREOPEN 147 freopen(input.txt, r, stdin); 148 freopen(output.txt, w, stdout); 149 #endif 150 151 _main_(); 152 153 #ifdef FILEIO 154 fclose(FIN); 155 fclose(FOUT); 156 #endif 157 158 #ifdef FREOPEN 159 fclose(stdin); 160 fclose(stdout); 161 #endif 162 163 #ifdef FSTREAM 164 fin.close(); 165 fout.close(); 166 #endif 167 168 return 0; 169 } 170 171 /*--- Main ---*/ 172 173 #define N 250005 174 175 int n; 176 int ans; 177 int h[N]; 178 int stk[N]; 179 int tot 0; 180 181 void _main_(void) 182 { 183 fsetup(stdin); 184 185 fread(n); 186 187 ri x; 188 189 up(n) 190 { 191 fread(x); fread(x); 192 while (tot stk[tot] x)--tot; 193 if (tot stk[tot] x)ans; 194 stk[tot] x; 195 } 196 197 putln(n - ans); 198 } BZOJ_1113.cpp 好像那天特别高兴的样子不知不觉就敲了个不明所以的模板 补一份正常的代码。 1 #include bits/stdc.h2 signed main(void) {3 int n, tot 0;4 scanf(%d, n);5 std::stackint stk;6 for (int i 1; i n; i) {7 int h; scanf(%*d%d, h);8 while (!stk.empty() h stk.top())9 stk.pop(); 10 if (!stk.empty() h stk.top()) 11 tot; 12 stk.push(h); 13 } 14 printf(%d\n, n - tot); 15 } BZOJ_1113.cpp     Author: YouSiki转载于:https://www.cnblogs.com/yousiki/p/6091683.html
http://www.zqtcl.cn/news/873810/

相关文章:

  • 环球资源网站网址微信管理中心
  • 青岛seo建站企业网址下载
  • 开发网站多少钱一个月做网站宽度
  • wordpress企业站主题哪个好做床上用品网站
  • 宜兴市做网站网站建设简讯
  • 点的排版设计网站音乐网站网页设计
  • 牛商网做网站的思路建设网站的机构
  • flash网站制作实例自适应网站做百度推广
  • 深圳建立网站电影里的做视频在线观看网站
  • 国家建设标准发布网站在哪里在线教育网站怎样建设
  • 徐州 商城网站设计winserver wordpress
  • 做网络课程的网站一般网站的架构
  • 网站建设包含哪些内容句容住房和城乡建设局网站
  • 做网站是做完给钱还是新房装修图片
  • 阿里云建站视频wordpress显示摘要插件
  • 济宁网站建设 企业谷网站开发有什么用
  • 网站建设一般多少钱官网代做网站公司哪家好
  • 页面简洁的网站深圳广告宣传片拍摄
  • 做外卖网站青岛助创网络科技有限公司
  • 怎么选择优秀的网站建设公司建设银行宁波分行 招聘网站
  • 工艺品网站模板下载-古色古香建站软件排名
  • 微视频网站源码网站建设目标个人博客dw
  • 山西省建设厅入晋备案网站洛阳网站在哪备案
  • 可以做物理试验的网站有哪些仿微博网站模板
  • 网站横幅怎做网站到期不想续费
  • 黑龙江网站备案管理局济南网站建设策划
  • 网站怎么静态化网页设计与制作图片显示不出来
  • 市场营销推广策划方案网站如何做标题优化
  • 怎么让客户做网站手机网站如何优化
  • 柳州市住房和城乡建设局网站首页赣州章贡区人口