2012年4月17日 星期二

When She Was Mine

會不會其實你很困惑?

開始找不到文字來表達,所以我積極的聽歌。

2012年4月12日 星期四

[Java] How to INPUT

[Java]學習程式語言的第一支

好像頗好玩,閒來無事學習學習

package javaapplication1;
/*
 * @author Jay
 */
public class JavaApplication1 
{
    public static void main(String[] args) 
    {
        System.out.println("Hello ! World!");
    }
}

2012年4月3日 星期二

UVa 591

#include <cmath>

using namespace std;

int main()
{
    int n = 0, counter = 1;

    while ( cin >> n && n != 0 )
    {
        int *ptr, sum = 0, average = 0;
        ptr = new int [n];

        for (int i = 0; i < n; i++)
        {
            cin >> ptr[i];
            sum += ptr[i];
        }

        sum /= n;

        for (int i = 0; i < n; i++)
        {
            average += abs(sum - ptr[i]);
        }

        cout << "Set #" << counter << endl;
        cout << "The minimum number of moves is " << average / 2 << "." << endl << endl;

        counter++;
        delete [] ptr;
    }

    return 0;
}

UVa 476

#include <cmath>
#include <cstring>
#include <algorithm>

using namespace std;

int main()
{
    char word;
    int endPtr = 0, counter = 0;
    
    double ptr[11][5];
    for (int i = 0; i < 11; i++)
        for (int j = 0; j < 5; j++)
            ptr[i][j] = 0.0;
        
    while ( true )
    {
        cin >> word;
        if (word == '*')
        {
            endPtr = counter;
            break;
        }

        cin >> ptr[counter][1] >> ptr[counter][2] >> ptr[counter][3] >> ptr[counter][4];
        counter++;
    }

    double x = 0.0, y = 0.0;
    int dot = 1;
    while (cin >> x >> y && (x != 9999.9 && y != 9999.9))
    {
        bool have = true;
        for (int i = 0; i <= endPtr; i++)
        {
            if ( (x > ptr[i][1] && x < ptr[i][3] && (y > ptr[i][4] && y < ptr[i][2])))
            {
                cout << "Point " << dot << " is contained in figure " << i << endl;
                have = false;
            }
        }

        if ( have )
            cout << "Point " << dot << " is not contained in any figure" << endl;

        dot++;
    }


    return 0;
}

2012年2月29日 星期三

2012年2月25日 星期六

擺在書架上的

在盤旋的天空裡,看到那麼點青藍色─夢境裡才出現的。


其實早就知道,也了解對方的言語

2012年2月15日 星期三

2012年2月14日 星期二

He said,

Never trouble trouble till trouble troubles you.
就像午後的陽光,在冷冽中綻放出溫暖

結束陰暗的大地。
 


2012年2月11日 星期六

All New World

You brought me to a whole new world.

Just ONE WEEK!

I realized the feeling we got, definitely truly.

You say ?

2012年1月14日 星期六

在開始之後

或許我坦承過什麼

或許我讓人失望了

或許在我努力後結果不一定是好的

2012年1月13日 星期五

你說呢?

外頭風好大,騎車逛逛

才發現有點困難,因為太晃了,實在

所以,你說開車如何?

2012年1月10日 星期二

Nothing to wish

回到澎湖四天了。

家裡沒甚麼變,只是多了些東西。

原本整齊的房間,也因為我回來而稍微亂了些

啊!太久沒回來忘記澎湖的風,手差點結冰

哈哈哈

瀟灑的笑一笑吧!