2015年7月17日

UVa-230 - Borrowers

摘要: 终于在UVa上AC了50题了,感觉还有很长的路要走!!!这道题有点麻烦,还是用STL写的。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int maxx=1010; 8 t... 阅读全文

posted @ 2015-07-17 21:26 windrises 阅读(739) 评论(0) 推荐(0) 编辑

UVa-10317 - Equating Equations

摘要: 一个即将高一的网友问的我的题。汗,我怎么大一才接触编程!用STL写的,当时UVa挂了,没有去测试。之后发现TLE了,把vector改成数组依然如此。一时没想到怎么解决,先这样吧,以后再看看。 1 #include 2 #include 3 #include 4 #include 5 #include... 阅读全文

posted @ 2015-07-17 20:57 windrises 阅读(156) 评论(2) 推荐(0) 编辑

UVa-1595 - Symmetry

摘要: 在看了别人的代码后发现有很多可以避免出现精度问题的方法(如坐标都乘2等) 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int maxx=1010; 7 const double eps=1e-5... 阅读全文

posted @ 2015-07-17 01:47 windrises 阅读(230) 评论(0) 推荐(0) 编辑

UVa-10391 - Compound Words

摘要: 继续用STL写,虽然比较耗时,但是简洁方便,不容易出错。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 const int maxx=1200... 阅读全文

posted @ 2015-07-17 01:45 windrises 阅读(141) 评论(0) 推荐(0) 编辑

UVa-10763 - Foreign Exchange

摘要: 掌握了新姿势 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int maxx=500010; 7 int a[maxx],b[maxx]; 8 int main() 9 {10 //fre... 阅读全文

posted @ 2015-07-17 01:44 windrises 阅读(261) 评论(0) 推荐(0) 编辑

UVa-10935 - Throwing cards away I

摘要: 简单的队列。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int main() 7 { 8 //freopen("in.in","r",stdin); 9 //freopen("out.in... 阅读全文

posted @ 2015-07-17 01:41 windrises 阅读(142) 评论(0) 推荐(0) 编辑

UVa-1594 - Ducci Sequence

摘要: 学到了新姿势,对结构体用map,set,sort等,可以在结构体中重载小于号(也有别的方式,没有仔细研究。)。注意const偷懒不加的话会通不过编译。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace s... 阅读全文

posted @ 2015-07-17 01:40 windrises 阅读(472) 评论(0) 推荐(0) 编辑

UVa-1593 - Alignment of Code

摘要: 这几天一直在刷《算法竞赛入门经典》,由于是STL章节,所以这篇和下面的几篇都用STL来写。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 co... 阅读全文

posted @ 2015-07-17 01:28 windrises 阅读(290) 评论(0) 推荐(0) 编辑

从CSDN搬过来了

摘要: 放暑假了,这几天一直待在学校自己刷题。7.20-8.20一个月将会在集训中度过。 阅读全文

posted @ 2015-07-17 01:24 windrises 阅读(130) 评论(0) 推荐(0) 编辑

导航