2012/4/18

Windows Server 8 Installed

Windows Server “8” 系統需求:

•處理器:1.4 GHz的64位處理器以上*
•記憶體:512 MB ​​RAM以上*
•可用硬碟空間:32 GB以上*
•DVD-ROM光碟機
•Super VGA(800×600)或更高解析度的顯示器
•鍵盤
•Microsoft Mouse或其他相容的指位設備

*註:32 GB是考慮能夠安裝成功的最小值。因為超過16 GB的RAM的電考將需要更多的分頁空間,提供休眠功能等等。
*註:實際需求會根據系統配置和您選擇安裝的應用程式和功能而不同
。處理器的性能是依賴於不僅是處理器的頻率,還有內核數量和處理器快取記憶體的大小。如果你是通過網路來安裝,可能需要額外的可用硬盤空間。

image

image

image

image

image

image

image

image

image

image

image

image

image

image

2012/4/17

RE: [光通訊時代] Google Code Jam 2012 資格賽 第二題 Problem B. Dancing With the Googlers 重構跟短碼之後,可讀性?

在短一次 但是這次是錯的!!! 有空在review! 前進第四題!!!

 

#include "stdafx.h"

 

void main()

{

 

        int C[2][3] = {{1, 2, 2}, {0, 0, 1}};

        int l,n,s,p,i,j,t,x;

        scanf("%d", &l);

        for(i=0;i<l;i++)

        {

                int c=0;

                scanf("%d %d %d", &n, &s, &p);

                for(j=0;j<n;j++)

                {                                      

                    scanf("%d", &t);

                    int r = C[(x = p-t/3)-1][t-t/3*3];                                                 

                                        c +=  (x <= 0 || r%2 && s-->0 || r/2) && t && x <= 2;                   

                }

                printf("Case #%d: %d\n", i+1,c);

        }     

}

 

From: Kradark [mailto:kradark@gmail.com]
Sent: Tuesday, April 17, 2012 11:46 AM
To:
Subject: [
光通訊時代] Google Code Jam 2012 資格賽 第二題 Problem B. Dancing With the Googlers 重構跟短碼之後,可讀性?

 

重構跟短碼之後,可讀性?

#include "stdafx.h"

 

void main()

{

        int table[2][3] = {    {1, 2, 2}, {0, 0, 1} };

        int line,n,s,p,i,j,t,x; 

        scanf("%d", &line);

        for(i=0;i<line;i++)

        {

                int count=0;

                scanf("%d %d %d", &n, &s, &p);

                for(j=0;j<n;j++)

                {

                        scanf("%d", &t);

                        if(!(t || p)) count++;

                        if(!t) continue;

                        if( (x = p-t/3) > 2 ) continue;                  

                        if( x <= 0 ) { count++; continue; }                   

                        if( table[x-1][t-t/3*3] ==1 ) { count += s-->0;  continue; }

                        if( table[x-1][t-t/3*3] ==2 ) count ++;                    

                }

                printf("Case #%d: %d\n", i+1,count);

        }      

}

 

From:

 

Smail Set 一次 10分。

Large Set 一次 15分。

花費時間: 1hr 15min

 

http://code.google.com/codejam/contest/1460488/dashboard#s=p1&a=1

 

 

題目分析:

這一題在考題目理解能力,有人說數學的符號很重要,沒萊布尼茲發明微積分符號,

就沒有後來蓬勃的發展,那解程式符號與圖型也很重要,不然題目落落長,看了三遍也不懂。

 

看似很複雜,其實整體只有六種一般狀況加上一種例外。

六種一般狀況用表格表式,因為狀況單純所以用查表的,

就是table的第一與第二個column

 

 

 

From:

 

// DancingWithGooglers.cpp : Defines the entry point for the console application.

//

 

#include "stdafx.h"

 

void main()

{

        // 0=>x, 1=>sprz, 2=>count++

        int table[3][4] =

        {

                {0, 1, 0, 0},

                {0, 2, 0, 0},

                {0, 2, 1, 0}

        };

 

        int line,n,s,p,i,j,t,m,q,r,x;

        int count;

        scanf("%d", &line);

        for(i=0;i<line;i++)

        {

                count=0;

                scanf("%d %d %d", &n, &s, &p);

                for(j=0;j<n;j++)

                {

                        scanf("%d", &t);

                        if(t==0) //例外

                        {

                                if(p==0) count++;

                                continue;

                        }

                        m=t/3;

                        x = p-m;

                        if( x > 2 ) continue;

                        q = t-m*3;

 

                        //printf("n,s,p,t,m=t/3,x=p-m,q,table[q][x]=%d,%d,%d,%d,%d,%d,%d,%d\n",n,s,p,t,m,x,q,table[q][x]);

                        if(x>0)

                        {

                                r = table[q][x];

                                if(r==1) { //sprz

                                        if(s>0) {

                                                count ++;

                                                s--;

                                        }

                                }

                                if(r==2)

                                {

                                        count ++;

                                        //count += !(table[q][x]==0);

                                }

                        }else{

                                count++;                 

                        }

                }

                printf("Case #%d: %d\n", i+1,count);

        }      

}



--
Kradark 4/17/2012 11:45:00 上午 張貼在 光通訊時代

Google Code Jam 2012 資格賽 第二題 Problem B. Dancing With the Googlers 重構跟短碼之後,可讀性?

重構跟短碼之後,可讀性?

#include "stdafx.h"

 

void main()

{

        int table[2][3] = {    {1, 2, 2}, {0, 0, 1} };

        int line,n,s,p,i,j,t,x; 

        scanf("%d", &line);

        for(i=0;i<line;i++)

        {

                int count=0;

                scanf("%d %d %d", &n, &s, &p);

                for(j=0;j<n;j++)

                {

                        scanf("%d", &t);

                        if(!(t || p)) count++;

                        if(!t) continue;

                        if( (x = p-t/3) > 2 ) continue;                  

                        if( x <= 0 ) { count++; continue; }                   

                        if( table[x-1][t-t/3*3] ==1 ) { count += s-->0;  continue; }

                        if( table[x-1][t-t/3*3] ==2 ) count ++;                    

                }

                printf("Case #%d: %d\n", i+1,count);

        }      

}

 

From:

 

Smail Set 一次 10分。

Large Set 一次 15分。

花費時間: 1hr 15min

 

http://code.google.com/codejam/contest/1460488/dashboard#s=p1&a=1

 

 

題目分析:

這一題在考題目理解能力,有人說數學的符號很重要,沒萊布尼茲發明微積分符號,

就沒有後來蓬勃的發展,那解程式符號與圖型也很重要,不然題目落落長,看了三遍也不懂。

 

看似很複雜,其實整體只有六種一般狀況加上一種例外。

六種一般狀況用表格表式,因為狀況單純所以用查表的,

就是table的第一與第二個column

 

 

 

From:

 

// DancingWithGooglers.cpp : Defines the entry point for the console application.

//

 

#include "stdafx.h"

 

void main()

{

        // 0=>x, 1=>sprz, 2=>count++

        int table[3][4] =

        {

                {0, 1, 0, 0},

                {0, 2, 0, 0},

                {0, 2, 1, 0}

        };

 

        int line,n,s,p,i,j,t,m,q,r,x;

        int count;

        scanf("%d", &line);

        for(i=0;i<line;i++)

        {

                count=0;

                scanf("%d %d %d", &n, &s, &p);

                for(j=0;j<n;j++)

                {

                        scanf("%d", &t);

                        if(t==0) //例外

                        {

                                if(p==0) count++;

                                continue;

                        }

                        m=t/3;

                        x = p-m;

                        if( x > 2 ) continue;

                        q = t-m*3;

 

                        //printf("n,s,p,t,m=t/3,x=p-m,q,table[q][x]=%d,%d,%d,%d,%d,%d,%d,%d\n",n,s,p,t,m,x,q,table[q][x]);

                        if(x>0)

                        {

                                r = table[q][x];

                                if(r==1) { //sprz

                                        if(s>0) {

                                                count ++;

                                                s--;

                                        }

                                }

                                if(r==2)

                                {

                                        count ++;

                                        //count += !(table[q][x]==0);

                                }

                        }else{

                                count++;                 

                        }

                }

                printf("Case #%d: %d\n", i+1,count);

        }      

}

Google Code Jam 2012 資格賽 第二題 Problem B. Dancing With the Googlers

Smail Set 一次 10分。

Large Set 一次 15分。

花費時間: 1hr 15min

 

http://code.google.com/codejam/contest/1460488/dashboard#s=p1&a=1

 

 

題目分析:

這一題在考題目理解能力,有人說數學的符號很重要,沒萊布尼茲發明微積分符號,

就沒有後來蓬勃的發展,那解程式符號與圖型也很重要,不然題目落落長,看了三遍也不懂。

 

看似很複雜,其實整體只有六種一般狀況加上一種例外。

六種一般狀況用表格表式,因為狀況單純所以用查表的,

就是table的第一與第二個column

 

 

 

From:

 

// DancingWithGooglers.cpp : Defines the entry point for the console application.

//

 

#include "stdafx.h"

 

void main()

{

        // 0=>x, 1=>sprz, 2=>count++

        int table[3][4] =

        {

                {0, 1, 0, 0},

                {0, 2, 0, 0},

                {0, 2, 1, 0}

        };

 

        int line,n,s,p,i,j,t,m,q,r,x;

        int count;

        scanf("%d", &line);

        for(i=0;i<line;i++)

        {

                count=0;

                scanf("%d %d %d", &n, &s, &p);

                for(j=0;j<n;j++)

                {

                        scanf("%d", &t);

                        if(t==0) //例外

                        {

                                if(p==0) count++;

                                continue;

                        }

                        m=t/3;

                        x = p-m;

                        if( x > 2 ) continue;

                        q = t-m*3;

 

                        //printf("n,s,p,t,m=t/3,x=p-m,q,table[q][x]=%d,%d,%d,%d,%d,%d,%d,%d\n",n,s,p,t,m,x,q,table[q][x]);

                        if(x>0)

                        {

                                r = table[q][x];

                                if(r==1) { //sprz

                                        if(s>0) {

                                                count ++;

                                                s--;

                                        }

                                }

                                if(r==2)

                                {

                                        count ++;

                                        //count += !(table[q][x]==0);

                                }

                        }else{

                                count++;                 

                        }

                }

                printf("Case #%d: %d\n", i+1,count);

        }      

}