ZOJ3672:Gao The Sequence

安装opencv2.0

解压OpenCV-2.0.0.tar.bz2

tar xvf OpenCV-2.0.0.tar.bz2

配置

./configure --host=arm-linux \

--without-carbon \

--without-quicktime \

--without-1394libs \

--without-ffmpeg \

--without-python \

--without-swig \

--without-gtk \

--enable-static \

--enable-shared \

--disable-apps \

--without-gtk \

--prefix=$PWD/output/A31 \

--libdir=$PWD/output/A31/lib \

--includedir=$PWD/output/A31/include

error: ‘ptrdiff_t‘ does not name a type 解决方法:

Jose Luis Blanco — 2011年5月9日
上午2:13:03

patch_to_fix_opencv_2.1_624950.diff (454
B)

I confirm this bug and that it‘s serious since it prevents other
packages to build in SID with the newest g++ 4.6.

However, it can be very easily fixed by patching one single line, as
shown in the attached patch (also copied below):

=============================
diff -w -rupN OpenCV-2.1.0//include/opencv/cxcore.hpp
opencv-2.1.0//include/opencv/cxcore.hpp
--- OpenCV-2.1.0//include/opencv/cxcore.hpp	2010-04-06 03:24:40.000000000 +0200
+++ opencv-2.1.0//include/opencv/cxcore.hpp	2011-05-08 19:56:53.759113108 +0200
@@ -66,6 +66,7 @@ namespace cv {

 using std::vector;
 using std::string;
+using std::ptrdiff_t;

 template<typename _Tp> class CV_EXPORTS Size_;
 template<typename _Tp> class CV_EXPORTS Point_;
============================

Please, could a maintainer patch this package and issue a new rebuild??

BTW: After fixing this bug OpenCV seems not to completely build due to
a similar bug in the headers of libavcodec, but perhaps they‘ve
already patched it too in SID.

Cheers,
Jose Luis

--Show footer

error: highgui/loadsave.cpp:333:28:
error: ‘unlink’ was not declared in this scope   解决方法:

vi src/highgui/loadsave.cpp

加入:

#include<unistd.h>

ZOJ3672:Gao The Sequence,布布扣,bubuko.com

时间: 2024-10-06 08:44:00

ZOJ3672:Gao The Sequence的相关文章

python 读取中文CSV &#39;gbk&#39; codec can&#39;t decode bytes in position 2-3:illegal multibyte sequence

读取中文的文档如Excel,CSV文件,需要中文编码 如gbk 解码才能转Unicode:然而 数据混合类型,读CSV文件就会出错,经管Excel正常. UnicodeDecodeError :'gbk' codec can't decode bytes in position 2-3:illegal multibyte sequence意思是:将一个字符串,通过gbk的方式,去解码,想要获得Unicode字符串,结果出错了 解决方法:处理的字符的确是gb2312,但是其中夹杂的部分特殊字符,是

zoj Gao The Sequence

Gao The Sequence Time Limit: 2 Seconds      Memory Limit: 65536 KB You are given a sequence of integers, A1,A2,...,An. And you are allowed a manipulation on the sequence to transform the origin sequence into another sequence B1,B2,...,Bn(Maybe the tw

ASP ACCESS 报错:Selected collating sequence not supported by the operating system.

Selected collating sequence not supported by the operating system. 这个问题是在一个国外服务器上放ASP+ACCESS程序时出现的问题. 在本地测试的时候都好好的.没有任何问题,但传上去之后,服务器就提示:Selected collating sequence not supported by the operating system. 这个问题是因为国外服务器的系统是英文系统.所以与中文的ACCESS数据库出了差错. 具体的解决

zoj3672 Gao The Sequence

原地踏步了半年,感觉一切都陌生了~ 题意:a[i]-一个任意的数,这个数要等于a[1]~a[i-1]每个数减去任意一个数,经过多次这样的变换到达目标b序列,能到达就yes不能到达距no. 一开始各种分析,所有的差的和必须是偶数,sum(cha[1~i-1])>=cha[i](其中cha[i]=a[i]-b[i])等,后来想从最后一项的cha变0,然后同时消除紧邻着的cha,尽量消除,消除到最后不能消除就NO,华丽丽的WA了~ badcase: 33 02 01 0正确的答案是yes,第一项和第三

LeetCode:Longest Consecutive Sequence

Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example, Given [100, 4, 200, 1, 3, 2], The longest consecutive elements sequence is [1, 2, 3, 4]. Return its length: 4. Your algorithm should run i

HDU5806:NanoApe Loves Sequence Ⅱ(尺取法)

题目链接:HDU5806 题意:找出有多少个区间中第k大数不小于m. 分析:用尺取法可以搞定,CF以前有一道类似的题目. 1 #include<cstdio> 2 using namespace std; 3 typedef long long ll; 4 #define d\n I64d\n 5 int T,n,m,K,num,r,a[200010]; 6 ll ans; 7 int main() 8 { 9 scanf("%d",&T); 10 while (T

hdu_5806_NanoApe Loves Sequence Ⅱ(双指针)

题目链接:hdu_5806_NanoApe Loves Sequence Ⅱ 题意: 给你一段数,问你有多少个区间满足第K大的数不小于m 题解: 直接双指针加一下区间就行 1 #include<cstdio> 2 #include<algorithm> 3 #define F(i,a,b) for(int i=a;i<=b;i++) 4 using namespace std; 5 typedef long long ll; 6 const int N=2e5+7; 7 in

hdu 5667 Sequence 矩阵快速幂

题目链接:hdu 5667 Sequence 思路:因为fn均为a的幂,所以: 这样我们就可以利用快速幂来计算了 注意: 矩阵要定义为long long,不仅仅因为会爆,还会无限超时 要对a%p==0特判,以为可能出现指数%(p-1)==0的情况,那么在快速幂的时候返回的结果就是1而不是0了 /************************************************************** Problem:hdu 5667 User: youmi Language:

翻译经典之《Cisco Lan Switching》第六章(十):Topology Change Process

[版权声明:原创翻译文章,翻译水平有限,错误在所难免,翻译作者对文章中存在的错误或遗漏所造成后果不承担任何责任,请谨慎转载.转载请保留本声明及出处:blog.csdn.net/shallnet ,下载该书英文版] 既然TCN BPDU如此简单,那他怎么扮演如此重要的作用呢?在直接回答这个问题之前,先来看一个拓扑改变的微妙副作用.接下来的讨论引用了图6-17描述的情景. Figure 6-17. TCN BPDUs are Required to Update Bridge Tables More