My College Life

米インディアナ州DePauw University(デポー大学)1年生の日記。Computer Science専攻、Economics, Statistics二重副専攻予定。

SRM146Div1Easy

公式練り上げたらすぐできてびっくりしました。

でも毎回最低点付近しか取れないのはやはりアルゴリズムが良くないのでしょうか…

高得点取っている人たちはMath.Min()をさりげなく使っていました。そいうところですね、単純にJavaのライブラリをちゃんと把握して引っ張ってくることが出来ていないのが現状です。

Data Structuresの授業来学期頑張ります!

f:id:taysh898:20170120154858p:plain

授業

TopCoder以外も何か書かなきゃ!ということで、今日は先学期と来学期の授業について、ちょっとだけ書きます。

はい、これがFall 2016の成績。Psychologyとかなかなかえげつなかったけど何とかAをキープ。Food and Chemistry というのはFirst Year Seminarで、ライティングがたくさん出ます。書くのは好きではないのですが、特に苦手でもないので92.5%で超ギリギリA。逆にCS1は楽勝すぎて期末試験免除でAもらえました。Econは教授が最強レベルにつまらなかったけど、テストが難しくなかったので割と余裕でA。でもEconの内容は好きだったので、副専攻にしたいと思っています。

Econ以外の教授はフレンドリーで、質問すれば非常に丁寧に答えてくれて、ペーパー等のフィードバックからも細かいところまで見ていることが分かります。

f:id:taysh898:20170119144709p:plain

先学期は、風邪ひくと同時にアゴの骨を折るケガをしたりと大波乱だったので、春はもう少し穏やかに行けるといいかなーと思います。でも何とかオールA死守です。FYS とPsychologyは死ぬほど勉強したので報われてよかった…

主観的な話になりますが、Aは簡単に取れるかというと、「教授と授業のレベルによる」です。本当か知りませんが、州立大学のA = DePauwのCという噂もある程なので、基本的にはAを取るのは他の普通のレベルの大学よりは難しいでしょう。他のリベラルアーツに通ってる友達に聞いても、同じような印象です。今学期は100番台の授業しか取っていないというのも大きいとも思います。来学期は200番台が2つあるので一筋縄ではいかないでしょう。

ちなみにCumulativeが8.00になっているのは4単位すでにコネティカットの高校にいたときAPで取っていたからです。(Calculus BC, Physics C, Statistics, Human Geography) ギャップイヤー取ったけど1学期分はこれで早まっているので実質半浪くらいです笑

 

こちらが来学期の授業です。

f:id:taysh898:20170119145422p:plain

理系多いですが、しょうがないですねー

EconのBarreto教授はExcelを使った教育の第一人者みたいな人で、授業は激ムズということで有名でございます。Aを取るのはほぼ不可能とまで聞きましたが、そう言われると燃えるのがこの私、絶対A取ります。(断言)

Intro to Women's Studiesは何するのかよくわかってませんが、卒業のために最低一つはPower, Priviledge, and Diversity (PPD)という分野の授業を取らなくてはいけないので、まあリベラルアーツの醍醐味を味わおうではないかということで取ってみました。全く未知数。やる気も未知数。教科書チラ見したらなかなかに興味をそそらない内容だったのであまり期待していないです。でも特に今のアメリカ社会においてrelevantな内容だと思います。

SRFはScience Research Fellows の略で、Honors Programの一つです。これについては別の記事で書きますが、とりあえずUndergradでも教授と研究しようぜみたいなことです。DePauwを選んだ理由の一つですね。

他にもITAP (Information Technology Associates Program)っていうキャンパス内のIT系インターンプログラムで小遣い稼ぎしたり、ピアノ始めたり、いろいろ首突っ込んでるので追々紹介できたらと思います。

ちなみに今はWinter Termで、1月の3週間だけ1つ授業が取れます。私はSweet and Savory Scienceという料理とサイエンスの授業を取っていますが、0単位Pass/Failなだけあってゆるゆるなので、これについては書かないかも笑 今日は抹茶アイスと抹茶ティラミス作ったので楽しい日でしたが^^;

SRM145Div2Easy

さて2日目ですが、Div2はやっぱ全然シンプルですね。答え出すだけなら...

 

Problem Statement

    

Sometimes when computer programs have a limited number of colors to use, they use a technique called dithering. Dithering is when you use a pattern made up of different colors such that when the colors are viewed together, they appear like another color. For example, you can use a checkerboard pattern of black and white pixels to achieve the illusion of gray.

You are writing a program to determine how much of the screen is covered by a certain dithered color. Given a computer screen where each pixel has a certain color, and a list of all the solid colors that make up the dithered color, return the number of pixels on the screen that are used to make up the dithered color. Each pixel will be represented by a character in screen. Each character in screen and in dithered will be an uppercase letter ('A'-'Z') representing a color.

Assume that any pixel which is a color contained in dithered is part of the dithered color.

Definition

    
Class: ImageDithering
Method: count
Parameters: String, String
Returns: int
Method signature: int count(String dithered, String screen)
(be sure your method is public)

Limits

    
Time limit (s): 2.000
Memory limit (MB): 64

Constraints

- dithered will contain between 2 and 26 upper case letters ('A'-'Z'), inclusive.
- There will be no repeated characters in dithered.
- screen will have between 1 and 50 elements, inclusive.
- Each element of screen will contain between 1 and 50 upper case letters ('A'-'Z'), inclusive.
- All elements of screen will contain the same number of characters.

Examples

0)  
    
"BW"
{"AAAAAAAA",

 "ABWBWBWA",

 "AWBWBWBA",

 "ABWBWBWA",

 "AWBWBWBA",

 "AAAAAAAA"}
Returns: 24
Here, our dithered color could consist of black (B) and white (W) pixels, composing a shade of gray. In the picture, there is a dithered gray square surrounded by another color (A).
1)  
    
"BW"
{"BBBBBBBB",

 "BBWBWBWB",

 "BWBWBWBB",

 "BBWBWBWB",

 "BWBWBWBB",

 "BBBBBBBB"}
Returns: 48
Here is the same picture, but with the outer color replaced with black pixels. Although in reality, the outer pixels do not form a dithered color, your algorithm should still assume they are part of the dithered pattern.
2)  
    
"ACEGIKMOQSUWY"
{"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWX",

 "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWX",

 "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWX",

 "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWX",

 "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWX",

 "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWX"}
Returns: 150
A picture of vertical stripes, every other stripe is considered part of the dithered color.
3)  
    
"CA"
{"BBBBBBB",

 "BBBBBBB",

 "BBBBBBB"}
Returns: 0
The dithered color is not present.
4)  
    
"DCBA"
{"ACBD"}
Returns: 4
The order of the colors doesn't matter.

This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2003, TopCoder, Inc. All rights reserved.

 

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
public class ImageDithering
{
  public int count(String dithered, String[] screen)
  {
   int ct = 0;

   for (int i = 0; i < screen.length; i++) {
    for (int j = 0; j < screen[i].length(); j++) {
     for (int k = 0; k < dithered.length(); k++) {
      if (screen[i].charAt(j) == dithered.charAt(k))
       ct++;
     }
    }
   }

   return ct;
  }
}

まだちゃんとしたコードのコピペ方法がわかりませんが、とりあえずパッと思い浮ぶのはこれくらいでした。3つもループ使ってるので ~N^3になっちゃってますが10分足らずで書けたのでまあいっか。Hash setを使うといいみたいですが、まだまだ知識不足ですね…

今は結構暇なのでCourseraでAlgorithms Part 1っていう授業取ってます。これで効率のいいコードが書けるようになるといいんですが

久しぶりに

全然ブログ更新していなかったのですが、そろそろ放置歴7ヶ月を過ぎそうなのでちょっと更新します。

大学に入ってからはいろいろあり過ぎて書ききれないかつ書くのめんどいので、今日は普通にマイブームについて書きます。

今、私はComputer Science を学んでいるのですが、オンライン上でプログラミングの練習ができるTopCoderというサイトを使っています。今年はHackathonに出てみたいです。

ということで、今日の問題:SRM145 DIV1 250 points

Problem Statement

    

You have a certain amount of money to give out as a bonus to employees. The trouble is, who do you pick to receive what bonus? You decide to assign a number of points to each employee, which corresponds to how much they helped the company in the last year. You are given an int points, where each element contains the points earned by the corresponding employee (i.e. points[0] is the number of points awarded to employee 0). Using this, you are to calculate the bonuses as follows:

- First, add up all the points, this is the pool of total points awarded.
- Each employee gets a percentage of the bonus money, equal to the percentage of the point pool that the employee got.
- Employees can only receive whole percentage amounts, so if an employee's cut of the bonus has a fractional percentage, truncate it.
- There may be some percentage of bonus left over (because of the fractional truncation). If n% of the bonus is left over, give the top n employees 1% of the bonus. There will be no more bonus left after this. If two or more employees with the same number of points qualify for this "extra" bonus, but not enough bonus is left to give them all an extra 1%, give it to the employees that come first in points.

The return value should be a int, one element per employee in the order they were passed in. Each element should be the percent of the bonus that the employee gets.

Definition

    
Class: Bonuses
Method: getDivision
Parameters: int
Returns: int
Method signature: int getDivision(int points)
(be sure your method is public)

Limits

    
Time limit (s): 2.000
Memory limit (MB): 64

Constraints

- points will have between 1 and 50 elements, inclusive.
- Each element of points will be between 1 and 500, inclusive.

Examples

0)  
    
{1,2,3,4,5}
Returns: { 6,  13,  20,  27,  34 }
The total points in the point pool is 1+2+3+4+5 = 15.
Employee 1 gets 1/15 of the total pool, or 6.66667%, Employee 2 gets 13.33333%, Employee 3 gets 20% (exactly), Employee 4 gets 26.66667%, and Employee 5 gets 33.33333%. After truncating, the percentages look like:
{6,13,20,26,33}
Adding up all the fractional percentages, we see there is 2% in extra bonuses, which go to the top two scorers. These are the employees who received 4 and 5 points.
1)  
    
{5,5,5,5,5,5}
Returns: { 17,  17,  17,  17,  16,  16 }
The pool of points is 30. Each employee got 1/6 of the total pool, which translates to 16.66667%. Truncating for all employees, we are left with 4% in extra bonuses. Because everyone got the same number of points, the extra 1% bonuses are assigned to the four that come first in the array.
2)  
    
{485, 324, 263, 143, 470, 292, 304, 188, 100, 254, 296,
 255, 360, 231, 311, 275,  93, 463, 115, 366, 197, 470}
Returns: 
{ 8,  6,  4,  2,  8,  5,  5,  3,  1,  4,  5,  4,  6,  3,  5,  4,  1,  8,
  1,  6,  3,  8 }
 

This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2003, TopCoder, Inc. All rights reserved.

めんどいのでさすがに訳さないけど、こんな感じです。

今のところJavaが私にはやりやすいので、Javaで書きました。

 

public class Bonuses
{
   public int getDivision(int points)
   {
     double total = 0.0;
     int extra = 100, n = points.length;
     int[] bonuses = new int[n];

     for (int i = 0; i < n; i++) {
       total += points[i];
     }
     for (int j = 0; j < n; j++) {
       bonuses[j] = (int) (points[j] / total * 100);
       extra -= bonuses[j] ;
     }
     if (extra != 0) {
       for (int i = 0; i < extra; i++) {
         int max = 0, index = 0;
         for (int j = 0; j < n; j++) {
           if (points[j] > max) {
           max = points[j];
           index = j;
           }
         }
         points[index] = 0;
         bonuses[index]++;
       }
     }
     return bonuses;
   }
}

コードのきれいなコピペの仕方知ってる方いらっしゃれば教えてください。points[index] = 0; にすればいいんだってことに気づくのに時間かけすぎたのと、洗濯したり友達と話したりして途中1時間くらい放置してたので、75.83しかもらえなかったけど、とりあえず通ったのでいっかって感じですねー

まだ始めたばかりですが、なるべく毎日練習しようと思います。

海外大進学に塾は必要か

結論から言うと、必ずしも必要ではないと思います。なぜなら、僕は某ルート○とかア○スとか行かなくても、インターネットと学校の先生のお力で何とかなったからです。ただ、そういった塾に行くと、同じ志を持つ仲間がいるのはかなり大きいと思います。僕は学校には海外へ進学する人がいなかったので、かなり孤独でしたし、先生方にもすべてを0から説明しなければいけませんでした。それはそれでいい体験でしたが…

実際のところ、TOEFLやSAT対策は過去問があれば自力でできるとしても、エッセイに関しては、やはりプロに頼るのがいいと思っていました、が、そこそこ高いのです¥

そこで、

http://www.essayforum.com/

というサイトを見つけました。無料ですが、添削者に元アドミッションオフィサーの方がいたりと、意外と役立ちました。

僕はここでほぼすべてのエッセイを見てもらいました。このエッセイがどれくらい合格に貢献したのかは分かりませんが、何もやらないよりはずっとマシでした。

ただ、お金のことを考えると、「塾に通ってApplicationを強くしてFinancial Aidをより多くもらえるようにすることによって全体的には安くなる」という考え方もあるので、一度検討するといいと思います。

また、グルーバンクロフト基金に正規で通過すれば(僕は2次募集枠でした)、エッセイ添削等のサポートは受けられるようです。

 

お金の話

出願プロセスからTOEFLやSAT等についてはググればすぐ情報がわかるので、僕はググっても中々出てこない、かつ、情報がコロコロ変わる、生々しいお金の話をしたいと思います。すぐにお金で諦める前に是非最後まで目を通してみてください。(TOEFLibt100点前後取れて成績と課外活動がそこそこでないと難しいと思いますが…)

アメリカの4年制大学に進学するために必要な金額は、行く学校により様々ですが、トップレベルの4年制大学では、奨学金なしの場合、学費だけで年間約500万円かそれ以上、寮費・食費・渡航費等も合わせれば年間700万円を超えることは珍しくありません。

日本の大学に進学する場合であれば、私立理系で年間約130万円、国立で年間約60万円です。

これだけ見れば、(教育の質は疑わしいですが)コスト面では圧倒的に日本の大学の方が安い。

しかし、アメリカの4年制大学に進学する留学生で、これだけ多額のお金をすべて払っている人は、これまた学校によりますが、中国とかの超お金持ちの家庭以外ほぼいないと思います。なぜなら多少なりとも給付型奨学金(またはアメリカ人ならローン等)をもらっているからです。家庭の収入にもよりますが、学費を半分以下にするのは難しくないと思います。

ちなみに、この「学生もしくはその家族がどのくらいお金を持っているか」が、ほぼすべての大学である程度重要にならざるを得なくて、合格率もお金がある方が高くなります。露骨ですね。(MIT, Harvard, Yale, Princeton, Amherstの5校だけは例外です。)

それでも、僕はやっぱり何だかんだでお金がかかると思います。僕は運よく学費は免除してもらえたけれど、結局お金は寮費食費等だけで日本の国立大学に行って近くで一人暮らしするくらいかかってしまう。僕の場合、家が母子家庭なので、正直経済的にはきついです。

もちろん、優秀であれば、国立大学に行くよりも安くトップレベルの大学へ進学する道はあります。

例えば、上記の5校の例外の1つ、ハーバード大学であれば、合格した学生が年収65,000ドル以下の家庭の負担は0ドルで通うことができます。

4年間学費免除の奨学金を得て、かつ国内の財団からも奨学金をもらうという方法もあります。例えば、Wesleyan大学はFreeman奨学金という学費免除の奨学金があり、日本からは毎年1人選ばれます。Oberlin大学では、ライシャワー奨学金、我らがDePauw大学では、僕がもらえたRector (Grew) 奨学金なども毎年日本から1人選ばれています。しかも全然知られていないから倍率が低いです。

国内では、アメリカのリベラルアーツ・カレッジであればグルーバンクロフト基金が超有名です。ググってください。僕の奨学金もここからの推薦でもらえました。今年からはGrinnell Collegeも学費免除枠が増え、Carleton Collegeも4年に一回だけ4年分学費免除のラッキーイヤーもあるみたいです。この基金の奨学生選抜を通れば、順位に応じて基金から返済義務のない奨学金がもらえます。学費免除をもらうと、基金からは年間100万円が支給されます。このグルーバンクロフト基金、意外と倍率が低い(10倍もいかない?)ので是非狙ってください!

他にも、リベラルアーツでなくても、Kiyo Sakaguchi奨学金(数学系専攻に限る)や、さらに来年度からスタートする柳井正財団もあります。(毎年10人、年間7万ドルを4年間支給、という前代未聞の太っ腹な奨学金です。)

また、Berea Collegeというアメリカで唯一の学費ゼロのリベラルアーツカレッジもあります。(ノーベル賞受賞者も輩出したみたいです。)

他にも僕が知らないだけで福岡とか日本の地方の奨学金などもありますし、その辺はリサーチしてみて下さい。とりあえず僕が知っている範囲の情報は載せたと思います!

結局のところ、こういった情報をいかに見つけて、行動に移すやる気と覚悟があるかが大事だと思います。

教育の質の話は一切触れずに書いたので、またいつかその辺書こうと思います。

 

 

自己紹介

こんにちは!2016年8月から米インディアナ州DePauw University(デポー大学)へ進学する荒木柊人と申します。(名前はシュートですがサッカーやバスケはおろか球技はまるでできません笑)

アメリカのリベラルアーツ留学に興味がある高校生の方々も、子供がアメリカ行きたいとか言い出したけどそんなお金ないのよーって保護者さんも、デポーって何それ変な名前wって人も、なんかデッポン(昔お母さんと一緒で踊りのお姉さんがやってたやつ)みたいって人も、誰でもいいので参考になれば幸いです。

初投稿ということで、簡単に僕の経歴をご紹介します。

1996 東京都生まれ

2012 新宿区立牛込第三中卒

   東京都立戸山高校入学

2015 高3の夏から1年休学して米コネティカット州へ留学(都教委のプログラムで全額負担していただきました。)

2016 東京都立戸山高校

   デポー大学入学予定

東京都生まれ東京都育ちのいわゆる純ジャパです。中学で英語を始めるまでは、ハローとナイストゥミーチューしか知りませんでした^^;

高校留学の話とか、学部正規留学のお金と奨学金の話とかもおいおい書いていこうと思います。