Блог пользователя buaamm

Автор buaamm, 14 лет назад, По-английски
Prob A: submitted in 2min, then learned how to hack.
Prob B: too lazy to read the problem, use a wrong Trie and failed the system test.
Prob E: old and easy problem, forget to change int to LL in my template, and failed the system test.

template for E:
/*****************************/
#define lowbit(z) (z&(-z))
const int maxn=1000015;
long long c1[maxn],c2[maxn];
int size;  //c[1..size]
void change(long long *c,int i,long long d){for(;i<=size;i+=lowbit(i))c[i]+=d;}
long long getsum(long long *c,int i){long long s=0;for(;i>0;i-=lowbit(i))s+=c[i];return s;}
/*****************************/

Prob D: easy TreeDP, get the longest path from root.

~~~1 hour Passed.~~~

Prob C: template is included in the given link(^_^).
--------------------------------------------------------
someone use an O(n^3) algo for E, and was hacked by me.

rank 67(all) / 9(contest), embarrassed.

2011-2-23

Полный текст и комментарии »

  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится