
ACLife
vizee
这个作者很懒,什么都没留下…
展开
-
ZOJ 3609
ZOJ 3609 Modular Inverse你可以用拓展欧几里德,但实际上一个for就ok了#include int gcd(int a,int b){ int r = a; while(a = r % b) { r = b; b = a; } return b;}int main(){ int T,a原创 2012-04-16 17:26:14 · 1167 阅读 · 0 评论 -
HDOJ 1671
HDOJ 1671 Phone List数据结构题字典树#include typedef struct _tagTrieNode { int count; struct _tagTrieNode *next[10];} TrieNode,*PTrieNode;TrieNode nodeStack[100000];int nodeTop;void initTrie原创 2012-04-11 08:52:15 · 607 阅读 · 0 评论 -
POJ 1002
#include #include #include int map[] = {2,2,2,3,3,3,4,4,4,5,5,5,6,6,6,7,0,7,7,8,8,8,9,9,9};int t[100002];int cmp(const void *a,const void *b){ return *(int *)a - *(int *)b;}int main(){ i原创 2012-05-08 14:22:21 · 498 阅读 · 0 评论 -
HDOJ 1129
HDOJ 1129 Do the Untwist字符串#include int main(){ char s[81]; int i,k,n,d,p,c[81]; while(scanf("%d",&k),k) { getchar(); gets(s); for(n = 0;s[n];n++) c[n] = s[n] == '_'? 0: s[n] ==原创 2012-04-11 09:13:23 · 496 阅读 · 0 评论 -
HDOJ 1000
代码1C提交#include int main(){ __asm { call _ and eax,0x642564 and eax,0x0a64 _: pop edi mov esi,edi add esi,5 __: add ebp,0原创 2012-10-16 10:25:13 · 888 阅读 · 0 评论 -
HDOJ 1010
#include char v[8][8];int ci,cj,ct;int n,m,t;int dfs(){ if(ci = n || cj >= m) return 0; if(v[ci][cj] == 2) if(ct == t) return 1; else return 0; else if(v[ci][cj]) { ct++; v[c原创 2012-10-15 14:11:13 · 941 阅读 · 0 评论