一:stringstream clear与str("")的问题 因为oj平台需要制作.in .out这样的测试数据,如果偶尔制作到没啥,可题量一大就会出问题,所以我想通过fstream 自动生成这些文件,并使文件名持续增大。 像1.in 2.in 3.in…… 这就涉及到了int类型与string ...
分类:
编程语言 时间:
2018-05-25 01:35:24
阅读次数:
241
这个对OJ上做题很有用。OJ基本都是用标准输入输出(USACO除外)。但如果你在调试的时候也都是从控制台输入,那就太浪费宝贵的时间了。我们可以重定向标准输入,调试的时候从文件读,提交时从标准输入读。 在C语言中,方法比较简单。使用函数freopen(): freopen("data.in","r", ...
分类:
编程语言 时间:
2018-05-23 18:10:37
阅读次数:
318
git config --global user.name "light-zhang" git config --global user.email "****@sina.cn" git config --global credential.helper cache cache不是windows 下 ...
分类:
其他好文 时间:
2018-05-21 14:44:44
阅读次数:
810
浏览器支持情况:一般情况都支持。最好是jQuery v1.x + lightbox.js,这样的组合IE6,IE7,IE8也支持! 1 light插件的下载地址:https://pan.baidu.com/s/1JeI6bXGwcPu9ohOYHGmmcQ 2 欣赏一下目录结构: 3 使用方法: 3 ...
分类:
其他好文 时间:
2018-05-21 10:31:44
阅读次数:
242
P1016 旅行家的预算 题目OJ链接https://www.luogu.org/problemnew/show/P1016 题目描述一个旅行家想驾驶汽车以最少的费用从一个城市到另一个城市(假设出发时油箱是空的)。给定两个城市之间的距离D1、汽车油箱的容量C(以升为单位)、每升汽油能行驶的距离D2、 ...
分类:
其他好文 时间:
2018-05-19 22:31:17
阅读次数:
155
https://www.lydsy.com/JudgeOnline/problem.php?id=3295 这个妹妹我曾见过的~~~ 之前应该在校内oj写了,似乎还写过题解?发现没写博客就重新水一遍代码水一篇博客好了。 把找逆序对的过程想成一个一个往里塞数字然后找每个数字可以组成的逆序对,把最后要去 ...
分类:
其他好文 时间:
2018-05-19 17:03:21
阅读次数:
178
Description 补足程序,使得下面程序输出结果是: 1.8 2.4 3.8 4.9 8.8 ~~~~ include include include include include include using namespace std; int main() { // Your Code ...
分类:
其他好文 时间:
2018-05-18 14:19:40
阅读次数:
131
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3878 ...
分类:
其他好文 时间:
2018-05-17 23:19:48
阅读次数:
192
Description 补足程序使得其输出结果是: 40 ~~~~ include include using namespace std; struct A { int n; A() { }; A(int n_ ):n(n_) { } // Your Code Here }; int main() ...
分类:
其他好文 时间:
2018-05-17 21:13:23
阅读次数:
141
长上升子序列 TimeLimit:1000MS MemoryLimit:64MB 64-bit integer IO format:%lld 已解决 | 点击收藏 | 已有4人收藏了本题 Problem Description 如果一个数列ai 满足 a1 < a2 < ... < aN 则这个数列 ...
分类:
其他好文 时间:
2018-05-17 19:54:51
阅读次数:
149