摘要: //3407//题意:给一段字符串,由状态转换图画出状态转换表 1 #include "bits/stdc++.h" 2 using namespace std; 3 char str[10010]; 4 struct DfaNode { 5 char ch; 6 int... 阅读全文
posted @ 2015-04-14 20:14 AC_Phoenix 阅读(333) 评论(0) 推荐(0)
摘要: //3555//题意:统计 1 到 n 中包含 49 的数的个数 1 #include "bits\stdc++.h" 2 using namespace std; 3 __int64 dp[22][3]; 4 5 int main() 6 { 7 int i; 8 dp[0][0... 阅读全文
posted @ 2015-04-14 18:05 AC_Phoenix 阅读(137) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2015-03-31 20:27 AC_Phoenix 阅读(6) 评论(0) 推荐(0)
摘要: //比赛时的代码感觉写得真心难看......Orz,还有一堆低级错误贴出来晒晒吧Problem A CodeForces 329A Purification2A 1 #include "bits/stdc++.h" 2 using namespace std; 3 char mat[110][1... 阅读全文
posted @ 2015-03-29 20:22 AC_Phoenix 阅读(214) 评论(0) 推荐(0)
摘要: //还是too young,因为没初始化len_name, len_str wa了一发 1 #include "bits\stdc++.h" 2 using namespace std; 3 char name[1010], str[1000010]; 4 5 int main() 6 { 7 ... 阅读全文
posted @ 2015-03-28 21:02 AC_Phoenix 阅读(329) 评论(0) 推荐(0)
摘要: 1 #include "bits\stdc++.h" 2 using namespace std; 3 int n, T; 4 double c; 5 int ans[200010]; 6 7 int m, p; 8 9 int main()10 {11 scanf("%d%d%lf"... 阅读全文
posted @ 2015-03-28 20:36 AC_Phoenix 阅读(202) 评论(0) 推荐(0)
摘要: 1 #include "bits/stdc++.h" 2 using namespace std; 3 char mat[110][110]; 4 int m, n; 5 6 int main() 7 { 8 scanf("%d%d", &m, &n); 9 int i, j;1... 阅读全文
posted @ 2015-03-28 19:27 AC_Phoenix 阅读(299) 评论(0) 推荐(0)
摘要: //思路:因为题目是要求求出所有可能被选完的 dish,所以当之前乘客所选 dish 不确定时,将所有 dish 的数量均减一(做法是记录下来不确定的 dish 的数量);当出现第一个顾客 QAQ(不开心) 的时候,说明在他之前至少有一个 dish 已经被选完了,这时候就需要利用不确定的 dish ... 阅读全文
posted @ 2015-03-27 23:10 AC_Phoenix 阅读(239) 评论(0) 推荐(0)
摘要: //戳这里:522D思路:为了简化问题我们先确定区间的右端,则需要先从右端最靠左的区间开始处理;处理某个区间时,我们将元素从 1 的位置处理到这个区间的右端(得到每个元素在其右侧最近相同元素的距离),然后只需要从这个区间的左端遍历到右端就能得到这个区间内的解。如果熟悉树状数组性质的话可以方便的把这个... 阅读全文
posted @ 2015-03-18 15:35 AC_Phoenix 阅读(327) 评论(0) 推荐(0)
摘要: //戳这里:522B//Problem tags 上竟然有人贴 data structures...保存最大的两个 h[i] 不就好了么...... 1 #include "iostream" 2 #include "cstdio" 3 using namespace std; 4 int n, w... 阅读全文
posted @ 2015-03-12 20:31 AC_Phoenix 阅读(269) 评论(0) 推荐(0)