首页 > 代码库 > todo

todo

 1 #include <stdio.h> 2 #include <string.h> 3 #include <stdlib.h> 4 #include <iostream> 5 #include <algorithm> 6 #define ll long long 7 using namespace std; 8 const int INF = 0x3f3f3f3f; 9 10 char num[2123456];11 int main(){12     int n, i, j, m;13     ll ans;14     bool k, d;15     int k_num, d_num;16     while(EOF != scanf("%d",&n)){17         memset(num, 0, sizeof(num));18         ans = d_num = 1;19         k = d = false;20         for(i = 0; i < n; ++i)  gets(num + strlen(num));21         for(i = 0; num[i] != 0; ++i){22                 char cur = num[i];23                 if(cur == {){24                     k_num = 1;25                     k = true;26                 }27                 if(cur == }){28                     ans *= k_num;29                     k = false;30                 }31                 if(k){32                     if(cur == |)    ++k_num;33                 }34                 if(d && cur !=   && i > 0 && num[i-1] ==  ){35                     ans *= d_num;36                     d_num = 1;37                 }38                 if(cur == $){39                     d_num = 1;40                     d = !d;41                 }42                 if(d && cur ==  ){43                     ++d_num;44                 }45                 if(ans > 100000)46                     break;47         }48          if(ans > 100000)   printf("doge\n");49          else printf("%I64d\n",ans);50     }51     return 0;52 }

http://blog.csdn.net/u013532224/article/details/38275551

http://www.cnblogs.com/zyue/p/3876616.html

http://blog.csdn.net/ljsspace/article/details/6431544