摘要: 以前做过类似的,写的很复杂,搞了一晚上。。2Y。 1 /* 2 ID: cuizhe 3 LANG: C++ 4 TASK: milk3 5 */ 6 #include <cstdio> 7 #include <cstring> 8 #include <cmath> 9 #include <algorithm> 10 using namespace std; 11 #define LL long long 12 int p[31][31][31]; 13 int qua[1000],qub[1000],quc[1000]; 14 int o[10 阅读全文
posted @ 2012-11-01 22:20 Naix_x 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 好纠结的。。。复杂度很高,开始的方法太暴力了,后来搞了一个 快了一点的枚举办法,水过了。。 1 /* 2 ID: cuizhe 3 LANG: C++ 4 TASK: ariprog 5 */ 6 #include <cstdio> 7 #include <cstring> 8 #include <cmath> 9 #include <algorithm>10 #include <ctime>11 using namespace std;12 #define LL long long13 int p[1250001],o[125000 阅读全文
posted @ 2012-11-01 18:42 Naix_x 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 过程是曲折的,代码是恶心的。无视把。。。和翻棋子游戏差不多,每种方式至多翻3次,然后在数据帮助下,终于A了。 1 /* 2 ID: cuizhe 3 LANG: C++ 4 TASK: clocks 5 */ 6 #include <cstdio> 7 #include <cstring> 8 #include <cmath> 9 using namespace std; 10 #define LL long long 11 LL ans; 12 int p[10][10],que[100],o[11]; 13 int judge() 14 { 15 int 阅读全文
posted @ 2012-11-01 11:52 Naix_x 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 题目链接以前想了好久的一个问题,没想到热身赛又出了,果断悲剧啊。。。看了一下题解,应该反着推啊。。。不联通的图可以分为两个部分k个结点联通,剩下n-k结点随便排列就好,这个图一定是不连通的。然后沿着这个思路做就可以写出递推式,这个题目需要高精度,java也太不熟了,语法都不不会。。 1 import java.io.*; 2 import java.math.*; 3 import java.util.*; 4 import java.text.*; 5 public class Main 6 { 7 public static void main(String[] args) 8 ... 阅读全文
posted @ 2012-11-01 09:52 Naix_x 阅读(234) 评论(0) 推荐(0) 编辑