2012年3月8日

摘要: 记下来当模版了。。。比赛完了之后一定要好好整理一下模版。。。如果在这题里用char* 代替 string 会不会更快一点?//Result:wizmann 3974 Accepted 42972K 3297MS G++ 879B#include <cstdio>#include <cstdlib>#include <cstring>#include <algorithm>#include <iostream>using namespace std;#define print(x) cout<<x<<endl#d 阅读全文
posted @ 2012-03-08 16:31 Wizmann 阅读(395) 评论(1) 推荐(0)
摘要: 1 //Result:wizmann 3371 Accepted 704K 0MS G++ 1699B 2 #include <cstdio> 3 #include <cstdlib> 4 #include <cstring> 5 #include <algorithm> 6 #include <iostream> 7 8 //Test data: 9 //A. Ole drei end dead fucked. AES. DES. Maerlyn's. Gute. TTOLE. 10 11 using namespace s 阅读全文
posted @ 2012-03-08 14:28 Wizmann 阅读(258) 评论(0) 推荐(0)

2011年5月27日

摘要: 第一次用,用来学习树状数组。。。#include <cstdio>#include <cstdlib>#include <cstring>#define MAX 32005inline int lowbit(int n){return n&(-n);}int number[MAX+5];int tree[MAX+5];int sum(int n){ int res=0; while(n>0) { res+=tree[n]; n-=lowbit(n); } return res;}void update(int n,int val){ while 阅读全文
posted @ 2011-05-27 22:27 Wizmann 阅读(191) 评论(0) 推荐(0)

导航