2011-02-01から1ヶ月間の記事一覧

TopCoder SRM 498 DIV2

Rating: 883→894(灰) 400.41 Pointsとりあえず上がったので良かった。 全体としては、コーディング速度の壁に一つブチ当たったような気もする。 250: AdditionGame 実装に迷ってしまって、最初vector→めんどい→set→「あ、違ぇや」などの流れを踏んだ結果、非…

近況

なかなか情オリも終わってしまったしどうしようか悩んでおり、そもそも学校の期末が迫っていて暇をしている余裕はないといった状況です。 昔から興味を持っていたHaskellをTry Haskell! An interactive tutorial in your browserを見たことで、あっ面白そう…

第10回 日本情報オリンピック(JOI) 本選に参加してきました

JOI

結論からいうと完敗(Cランク)でした。敗因はいろいろとあったと思いますが、そういった事とは他に学ぶ事ができた事もたくさんあったと思います。備忘録も兼ねて、この機会に折角なので流れなど書いておこうと思います。 勝手に名前が出てきた人はすいません…

TopCoder SRM 497 DIV2

Rating: 892→883(灰) 167.02 Points 250: Filtering ソートとかに迷いが生じてSubmitがすごい遅くなった。 167.02 Points #include <vector> #include <string> #include <algorithm> #include <map> using namespace std; class Filtering { public: vector <int> designFilter(vector <int> sizes, st</int></int></map></algorithm></string></vector>…

AOJ 0191 Baby Tree

404 Not Found やっとまともにDP解けたー!!!!!(嬉) #include <cstdio> #include <algorithm> using namespace std; int main() { int n, m; while(scanf("%d %d\n", &n, &m), n || m){ long double g[n][n]; /* dp[a][b]は、a回目にbの肥料を与えた時のaまでの成長率の最大値 */</algorithm></cstdio>…

日本情報オリンピック(JOI)第10回予選 本番で自分が解けなかった問題

4. 1年生 (A First Grader) 予選を受けた時点でDPという物が解けなかった。今でも解けない。 #include <cstdio> #include <vector> using namespace std; inline bool valid(int x){ return 0 <= x && x <= 20; } int main() { int N; scanf("%d\n", &N); vector<int> a(N); for(i</int></vector></cstdio>…

明日の目標

DP問題と、グラフ問題(とくに最小全域木あたり)の問題を一通り解く。 最小全域木 404 Not Found kyuridenamidaさんありがとうございます。 →謎のWA TopCoderのTimeTravellingSalesman 解説読んだらそう書いてあった。 →謎のWA DP 404 Not Found →わからん 40…

AOJ 2216 Summer of KMC

404 Not Found #include <cstdio> int main() { int A, B; while(scanf("%d %d\n", &A, &B), A || B){ int hyak = 0, gohyak = 0, sen = 0; int x = B - A; if(1000 <= x){ sen = x / 1000; x %= 1000; } if(500 <= x){ gohyak = x / 500; x %= 500; } if(100 <= x){</cstdio>…

Codeforces Beta Round #54 (Div. 2)

A. Chat room #include <iostream> #include <string> using namespace std; int main() { string s, t("hello"); cin>>s; int cnt = 0; for(int i = 0; i < s.size(); i++){ if(cnt >= t.size()) break; if(s[i] == t[cnt]){ cnt++; } } cout<<(cnt >= t.size() ? "YES" : "NO</string></iostream>…

TopCoder SRM 496 DIV2

Rating: 654→892(灰) 前が酷かったので上がってもまだ灰色コーダーだけれども、大分一気に上がった。Total: 698.3 points 250: AnagramFree 239.97 points #include <map> #include <string> #include <vector> using namespace std; class AnagramFree { public: int getMaximumS</vector></string></map>…