随笔分类 -  暴力

摘要:题目传送门:http://www.nocow.cn/index.php/Translate:USACO/camelot 这道题让我心痛,一开始写写不出,后来拖了很久,决定去看题解,没想到又看不懂官方题解,唉!后来看了下面的题解做了出来。题解的话,大概就是先预处理每个格子到另外格子的位置,再枚举在王的 阅读全文
posted @ 2016-03-17 22:46 Sun_Sea 阅读(273) 评论(0) 推荐(0)
摘要:题目传送门:http://www.nocow.cn/index.php/Translate:USACO/fence 这道题直接模拟就好了 /* ID:abc31261 LANG:C++ TASK:fence */ #include<cstdio> #include<cstring> #include 阅读全文
posted @ 2016-01-27 15:20 Sun_Sea 阅读(120) 评论(0) 推荐(0)
摘要:题目传送门:http://www.nocow.cn/index.php/Translate:USACO/ratios 这道题也是直接枚举。。。 /* ID:abc31261 LANG:C++ TASK:ratios */ #include<cstdio> #include<cstring> #inc 阅读全文
posted @ 2016-01-19 23:22 Sun_Sea 阅读(234) 评论(0) 推荐(0)
摘要:这道题直接枚举就好了,但我当时竟然没想到,我真是太失败了。。。。。Q_Q /* ID:abc31261 LANG:C++ TASK:spin */ #include<cstdio> #include<cstring> #include<iostream> using namespace std; c 阅读全文
posted @ 2016-01-19 23:13 Sun_Sea 阅读(199) 评论(0) 推荐(0)
摘要:这题一开始我想了又想,谁知道最后竟然一个暴力的高精度过了,官方的题解好像是用了一些数学的方法。 /* ID:abc31261 LANG:C++ TASK:fact4 */ #include<cstdio> #include<cstring> #include<iostream> using name 阅读全文
posted @ 2015-12-16 22:40 Sun_Sea 阅读(102) 评论(0) 推荐(0)
摘要:简单一个暴搜就能过了,但是我的双关键字快排我也是醉了(用c++的sort不会写双关键字排序,只好自己写,可是写得特别拙),代码混乱(看来我应该分开一个个函数写的) /* ID:abc31261 LANG:C++ TASK:contact */ #include<cstdio> #include<cs 阅读全文
posted @ 2015-12-08 23:02 Sun_Sea 阅读(163) 评论(0) 推荐(0)