2013年3月10日

error: '>>' should be '> >' within a nested template argument list|

摘要: 错误现场:vector<pair<ll, int>> v;在“<<”中加一个空格即可:vector<pair<ll, int> > v; 阅读全文

posted @ 2013-03-10 17:06 铁树银花 阅读(4577) 评论(0) 推荐(0) 编辑

C++ pair(对组)用法

摘要: 类模板:template <class T1, class T2> struct pair参数:T1是第一个值的数据类型,T2是第二个值的数据类型。功能:pair将一对值组合成一个值,这一对值可以具有不同的数据类型(T1和T2),两个值可以分别用pair的两个公有函数first和second访问。具体用法:1.定义(构造):1 pair<int, double> p1; //使用默认构造函数2 pair<int, double> p2(1, 2.4); //用给定值初始化3 pair<int, double> p3(p2); //拷贝构造函数2. 阅读全文

posted @ 2013-03-10 16:30 铁树银花 阅读(31849) 评论(2) 推荐(5) 编辑

Codeforces Round #171 (Div. 2) A. Point on Spiral(模拟)

摘要: A. Point on Spiraltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputValera the horse lives on a plane. The Cartesian coordinate system is defined on this plane. Also an infinite spiral is painted on the plane. The spiral consists of segments: [(0,  阅读全文

posted @ 2013-03-10 11:49 铁树银花 阅读(396) 评论(0) 推荐(0) 编辑

导航