Head Pic
Table_bottom

分类
Table_bottom

最新评论
Table_bottom

最新留言
Table_bottom

友情链接
Table_bottom

功能
Table_bottom

浏览计数器
1140
Table_bottom

I Am Just A Test

Frank Yang posted @ 2008年7月03日 03:58 in 未分类 with tags test tex highlight-code table , 1140 阅读

I am just a test.

 This part is for TeX Formula

 \mathop{\mathrm{corr}}(X, Y)=\frac{\displaystyle \sum_{i=1}^n(x_i-\overline x)(y_i-\overline y)}{\displaystyle\biggl[\sum_{i=1}^n(x_i-\overline x)^2 \sum_{i=1}^n(y_i-\overline y)^2 \biggr]^{1/2}}

Hermiticity of positive operators  show that a positive operator is necessarily Hermitian. (Hint: Show that an arbitrary operator A can be written A=B+iC where B and C are Hermitian.)

Show that all eigenvalues of a unitary matrix habe modulus 1, that is, can be written in the form e^{i \theta} for some real \theta.

And this part is for code highlight

 

 

  1. #include<stdio.h>
  2.  
  3. int maxn, n, a, ansn, ansd;
  4.  
  5. long long gcd(long long a, long long b)
  6. {
  7.         long long r;
  8.         while(b){
  9.                 r=a%b;
  10.                 a=b;
  11.                 b=r;
  12.         }
  13.         return a;
  14. }
  15.  
  16. void solve()
  17. {
  18.         long long r=0, b;
  19.        
  20.         int m, c, tmpn, tmpd;
  21.        
  22.         for(m=1; m<=maxn; m++){
  23.                 r=(r*10+1)%a;
  24.                 b=a/gcd(a, r);
  25.                 if(b<10){
  26.                         for(c=9; c>0; c--)
  27.                                 if(c%b==0){
  28.                                         tmpn=m; tmpd=c;
  29.                                         if(tmpn>ansn || (tmpn==ansn && tmpd>ansd)) ansn=tmpn, ansd=tmpd;
  30.                                         break;
  31.                                 }
  32.                 }
  33.         }
  34. }
  35.  
  36. int main()
  37. {
  38.         freopen("k.in", "r", stdin);
  39.         freopen("k.out", "w", stdout);
  40.        
  41.         int cc;
  42.        
  43.         scanf("%d", &cc);
  44.         while(cc--){
  45.                 scanf("%d %d", &maxn, &n);
  46.                 ansn=1; ansd=0;
  47.                 while(n--){
  48.                         scanf("%d", &a);
  49.                         solve();
  50.                 }
  51.                 printf("%d %d\n", ansn, ansd);
  52.         }
  53.        
  54.         return 0;
  55. }
  56.  

 

 

  1. #include<stdio.h>
  2.  
  3. int maxn, n, a, ansn, ansd;
  4.  
  5. long long gcd(long long a, long long b)
  6. {
  7.         long long r;
  8.         while(b){
  9.                 r=a%b;
  10.                 a=b;
  11.                 b=r;
  12.         }
  13.         return a;
  14. }
  15.  
  16. void solve()
  17. {
  18.         long long r=0, b;
  19.        
  20.         int m, c, tmpn, tmpd;
  21.        
  22.         for(m=1; m<=maxn; m++){
  23.                 r=(r*10+1)%a;
  24.                 b=a/gcd(a, r);
  25.                 if(b<10){
  26.                         for(c=9; c>0; c--)
  27.                                 if(c%b==0){
  28.                                         tmpn=m; tmpd=c;
  29.                                         if(tmpn>ansn || (tmpn==ansn && tmpd>ansd)) ansn=tmpn, ansd=tmpd;
  30.                                         break;
  31.                                 }
  32.                 }
  33.         }
  34. }
  35.  
  36. int main()
  37. {
  38.         freopen("k.in", "r", stdin);
  39.         freopen("k.out", "w", stdout);
  40.        
  41.         int cc;
  42.        
  43.         scanf("%d", &cc);
  44.         while(cc--){
  45.                 scanf("%d %d", &maxn, &n);
  46.                 ansn=1; ansd=0;
  47.                 while(n--){
  48.                         scanf("%d", &a);
  49.                         solve();
  50.                 }
  51.                 printf("%d %d\n", ansn, ansd);
  52.         }
  53.        
  54.         return 0;
  55. }
  56.  

 

 

And for table

   
   
   

 \mathop{\mathrm{corr}}(X, Y)=\frac{\displaystyle \sum_{i=1}^n(x_i-\overline x)(y_i-\overline y)}{\displaystyle\biggl[\sum_{i=1}^n(x_i-\overline x)^2 \sum_{i=1}^n(y_i-\overline y)^2 \biggr]^{1/2}}

 

 

 

 

 

#include<stdio.h>

int maxn, n, a, ansn, ansd;

long long gcd(long long a, long long b)
{
        long long r;
        while(b){
                r=a%b;
                a=b;
                b=r;
        }
        return a;
}

void solve()
{
        long long r=0, b;
       
        int m, c, tmpn, tmpd;
       
        for(m=1; m<=maxn; m++){
                r=(r*10+1)%a;
                b=a/gcd(a, r);
                if(b<10){
                        for(c=9; c>0; c--)
                                if(c%b==0){
                                        tmpn=m; tmpd=c;
                                        if(tmpn>ansn || (tmpn==ansn && tmpd>ansd)) ansn=tmpn, ansd=tmpd;
                                        break;
                                }
                }
        }
}

int main()
{
        freopen("k.in", "r", stdin);
        freopen("k.out", "w", stdout);
       
        int cc;
       
        scanf("%d", &cc);
        while(cc--){
                scanf("%d %d", &maxn, &n);
                ansn=1; ansd=0;
                while(n--){
                        scanf("%d", &a);
                        solve();
                }
                printf("%d %d\n", ansn, ansd);
        }
       
        return 0;
}
 

 

  1. #include<stdio.h>
  2.  
  3. int maxn, n, a, ansn, ansd;
  4.  
  5. long long gcd(long long a, long long b)
  6. {
  7.         long long r;
  8.         while(b){
  9.                 r=a%b;
  10.                 a=b;
  11.                 b=r;
  12.         }
  13.         return a;
  14. }
  15.  
  16. void solve()
  17. {
  18.         long long r=0, b;
  19.        
  20.         int m, c, tmpn, tmpd;
  21.        
  22.         for(m=1; m<=maxn; m++){
  23.                 r=(r*10+1)%a;
  24.                 b=a/gcd(a, r);
  25.                 if(b<10){
  26.                         for(c=9; c>0; c--)
  27.                                 if(c%b==0){
  28.                                         tmpn=m; tmpd=c;
  29.                                         if(tmpn>ansn || (tmpn==ansn && tmpd>ansd)) ansn=tmpn, ansd=tmpd;
  30.                                         break;
  31.                                 }
  32.                 }
  33.         }
  34. }
  35.  
  36. int main()
  37. {
  38.         freopen("k.in", "r", stdin);
  39.         freopen("k.out", "w", stdout);
  40.        
  41.         int cc;
  42.        
  43.         scanf("%d", &cc);
  44.         while(cc--){
  45.                 scanf("%d %d", &maxn, &n);
  46.                 ansn=1; ansd=0;
  47.                 while(n--){
  48.                         scanf("%d", &a);
  49.                         solve();
  50.                 }
  51.                 printf("%d %d\n", ansn, ansd);
  52.         }
  53.        
  54.         return 0;
  55. }
  56.  

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter