tozangezan's diary

勝手にソースコードをコピペして利用しないでください。

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

698F: Coprime Permutation

素因数→素因数の写像が何通りあるかと、それぞれの素因数内で数の並べ方が何通りあるか掛け算する。 前者は、同じ回数出現する素因数が自由に入れ替えられるので、それぞれの素因数に対して、indexにその素因数をもつ場所のgcdを求めて、対応をつけると自由…

Codeforces Round #348 (VK Cup 2016 Round 2, Div. 1 Edition)

何だこのセットは......。難問が誰にも存在しないセットだと、簡単が速いから勝ててしまう。 A B C D E F Place 00:13 00:06 00:34 (+1) 00:48 - - 4th A: 逆からやるだけ。 #include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #include<string> #include<string.h> #include<vector> #include<set> #incl</set></vector></string.h></string></queue></algorithm></math.h></stdio.h>…

第3回 Dwangoからの挑戦状 Finals

えええ....。せっかくの優勝チャンスを逃した。 A B C D Place 118:47 70:40 (+2) 47:52 (+2) - 5th A: ずっと前から見てて解けないと思ってトイレにいったら後ろからやるだけだった。こういうのが遅いのはダメでしょ #include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #</queue></algorithm></math.h></stdio.h>…

Codeforces Round #349 (Div. 1)

いつもと同じ死に方。成長が見られない。相変わらず注意力が灰底辺。 A B C D E Place 00:48 (+1) 00:35 (+4) 01:59 (+1) - - 59th A: メモ化再帰するだけ。メモ化し忘れて1TLE。 #include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #include<string> #include<string.h> #include<vector> #include<set> </set></vector></string.h></string></queue></algorithm></math.h></stdio.h>…

Codeforces Round #352 (Div. 1)

心が折れた。 灰コーダー並みの注意力だったのも悪いけど、サンプルも弱いし罠も多すぎだと思う。 A B C D E Place 00:28 (+1) 00:14 (+2) -5 - - 105th A: 嫌なケースが多すぎる。returnを忘れた。 #include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #include<string.h> #include<vector> </vector></string.h></queue></algorithm></math.h></stdio.h>…

Codeforces Round #359 (Div. 1)

面白いかどうかはさておき、教育された感がある。普段Aからやってると抜かされるのでBからやったら大失敗した。 A B C D E Place 01:01 00:48 - 01:35 - 57th A: やるだけ。 #include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #include<string.h> #include<vector> #include<set> #include<map> #incl</map></set></vector></string.h></queue></algorithm></math.h></stdio.h>…

Codeforces Round #360 (Div. 1)

初全完。全完ゲーはHack上乗せ勝負なのでVirtual Participation勢には不利。 A B C D E Place 00:07 00:17 (+1) 00:27 00:50 01:39 16th A: よくある二色塗りのUFを書いたら他の人に取り残されたんだけど、簡単な解法があるのかな。 #include<stdio.h> #include<math.h> #incl</math.h></stdio.h>…

Codeforces Round #362 (Div. 1)

解けたのに虚しくなる意味不明なセット。面白くはない。 A B C D E F Place 00:10 (+1) 00:17 00:38 01:14 - - 37th A: 辺を全部mapで更新する。何も考えずにやったらオーバーフローした。 #include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #include<string.h> #include<vector> #include<set> </set></vector></string.h></queue></algorithm></math.h></stdio.h>…

Codeforces Round #363 (Div. 1)

一体何をやっているんですかね...... A B C D E F Place 00:031 00:21 00:39 (+3) 02:07 (+7) - - 26th A: Div1...? #include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #include<string.h> #include<vector> #include<set> #include<map> #include<stdlib.h> using namespace std; const long long mod=10000000</stdlib.h></map></set></vector></string.h></queue></algorithm></math.h></stdio.h>…

Codeforces Round #364 (Div. 1)

遅いのとA,B逆なことを除けばうまくいった? A B C D E Place 00:26 00:33 01:28 - - 20th A: 全然わかりませんでした(オイ バス乗車時間を二分探索。式もなんだか難しい。 #include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #include<string.h> #include<vector> #include<set> #include<map> #include<stdlib.h></stdlib.h></map></set></vector></string.h></queue></algorithm></math.h></stdio.h>…

Codeforces Round #366 (Div. 1)

コンテストのバランスを全く考えていない難問セットなのですが、一つ一つはICPCの大変な問題(しかもサンプルも弱い)のような存在で、ただ実装が辛いだけでした。 ちなみにMARVELはヴェノム派です。 A B C D E Place 00:16 (+1) 00:53 (+3) - - - 33rd A: な…

AIM Tech Round 3 (Div. 1)

Virtual Participationはオンラインジャッジではありませんが...... 他の参加者全員が知っている典型を知らないとどうしようもなくなる好例。しっかりと典型を強くしておくことが求められるセット。AとかBとかかなりいやらしいけど。 A B C D E Place 00:02 …

Codeforces Round #371 (Div. 1)

ク ソ コ ン テ ス ト A B C D E Place 00:04 00:37 00:20 01:36 - 7th A: もちろんmultisetなぞ必要なく、偶奇の組み合わせごとに何個あるか持っておけばよい。 #include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #include<string.h> #include<vector> #include<set> #include<map> #include<stdlib.h> using n</stdlib.h></map></set></vector></string.h></queue></algorithm></math.h></stdio.h>…

Codeforces Round #372 (Div. 1)

単純に2時間コンテストとは思えないほど難しい。 A B C D E Place 00:08 00:44 - - - 56th A: (i+1)^2(i+2)^2にしてからsqrtを使う。(i+1)^2(i+2)^2はlong longに入らないが、あらかじめ(i+1)で割っておけば対処可能。 #include<stdio.h> #include<math.h> #include<algorithm> #include<queue> </queue></algorithm></math.h></stdio.h>…

Codeforces Round #373 (Div. 1)

紫コーダーはDiv1のwriterやるのやめてほしい。 A B C D E Place 00:13 削除*1 01:02 -4 - 42th A: 一番左に出てきた5を四捨五入していく。ひどい実装問題。 #include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #include<string.h> #include<vector> #include<set> #include<stdlib.h> using namespace std;</stdlib.h></set></vector></string.h></queue></algorithm></math.h></stdio.h>…

2017年の目標

去年は実験的に目標を立てなかったのですが、なんかいまいち何もできませんでした。今年は逆に努力系の目標を立ててみることにします。 競技プログラミング Div1 Hard のAC数を450以上にする 現在、306。ここ2年間と難しい時代のはまだまだたくさん問題が残…