2013年8月15日
摘要: #include #include #include using namespace std;#define M 1002struct node { int j,f; node(int _j,int _f) { j = _j; f = _f; } friend bool operator q;int main(int argc, char* argv[]){ #ifdef __MYLOCAL freopen("in.txt","r",stdin); #endif int m,n,Ji,Fi; double s; ... 阅读全文
posted @ 2013-08-15 09:57 lk1993 阅读(161) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std;#define M 1002struct node{ int j,f;};struct node jf[M];bool cmp(const node &a,const node &b){ return 1.0 * a.j / a.f > 1.0 * b.j / b.f;}int main(){// freopen("in.txt","r",stdin); int m,n; double s; while(scanf("%d%d",&m 阅读全文
posted @ 2013-08-15 09:56 lk1993 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1. a ^ b = b ^ a ;2. a ^ b ^ c = a ^ (b ^ c) = (a ^ b) ^ c ;3. d = a ^ b ^ c 可以推出 a = d ^ b ^ c ;4. a ^ b ^ a = b .#include #include #define M 1002int id[M];int main(){// freopen("in.txt","r",stdin); int n; while(scanf("%d",&n) != EOF) { for(int j=0; j 'Z') 阅读全文
posted @ 2013-08-15 09:33 lk1993 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 这题做起来有些烦躁,可能是题意没有理解清楚吧。题意:造出来的士兵第一天没有攻击力,但可以采样,且要消耗一天的生命,共 d 天生命。造一个士兵需要 k 天,k + 1 天时可以有攻击力,造到 k 天时相当于成活士兵的第一天。刚开始的士兵为第一天的士兵,没有攻击力,但可以采样。总共模拟 x 天。数据较大,采用 __int64。ps: 这题应该有数学公式,但难的推导,直接模拟了。#include #include #define M 102int n,d,k,a,x;__int64 live[M],grow[M],all;void add_day(){ __int64 A = 0; li... 阅读全文
posted @ 2013-08-15 09:27 lk1993 阅读(201) 评论(0) 推荐(0) 编辑