This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
O(n^2)ならば間に合う。グラフを辿る処理はO(n)なので、各ノードでO(n)の処理はでき | |
る。 | |
tree1のノードiとtree2のノードjについて、ノードiをルートとする部分木のサイズと、 | |
ノードjをルートとする部分木のサイズ、両方の部分木に共通して含まれるノードの個数 | |
を求めておけば、ノードiとノードjからルートに向かうエッジをそれぞれ取り除いた場合 | |
の、S(e1, e2)が計算できる。 | |
両方の部分木に共通して含まれるノード数は、事前に部分木にノードが含まれるかどうか | |
を調べておけば良い。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ケース: Antec P100 10,730 | |
マザー: Asus Z97-PRO 24,818 | |
CPU: Intel Core-i7-4790 35,480 | |
CPUクーラー: ENERMAX ETS-T40-BK 5,572 | |
メモリ: CFD-Elixir DDR3 1600 8GBx2 16,566 | |
OS: Windows 8.1 Pro 64bit 17,180 | |
電源: オウルテック FSP RAIDER RA-750 7,953 | |
光学ドライブ: 使い回し | |
SSD: Intel SSD 730 240GB 25,368 | |
HDD: HGST Deskstar 4TB 17,610 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alert(location); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for test in range(input()): | |
N, X = map(int, raw_input().split()) | |
S = map(int, raw_input().split()) | |
S.sort() | |
ans = 0 | |
a, b = 0, N-1 | |
while a<=b: | |
if a<b and S[a]+S[b] <= X: | |
a += 1 | |
b -= 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for test in range(input()): | |
N = input() | |
A = map(int, raw_input().split()) | |
ans = 0 | |
for i in range(N): | |
l = 0 | |
r = 0 | |
for j in range(N): | |
if A[j]>A[i]: | |
if j<i: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <set> | |
using namespace std; | |
// 蟻本 | |
const int MAX_V = 10*1024*1024; | |
struct edge { int to, cap, rev; }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
def trie(S): | |
X = {} | |
n = 1 | |
for s in S: | |
p = X | |
for c in s: | |
if c not in p: | |
p[c] = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <cstdarg> | |
#include <set> | |
#include <ctime> | |
#include <cstring> | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
TopCoder Open Marathon 2014 Round 3 CollageMaker | |
*/ | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <cstdarg> | |
#include <cmath> | |
#include <ctime> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
覚醒・絆MAX・LvMAXにして処分した部員リスト | |
スマイル | |
・桜坂しずく | |
・須田いるか | |
・永山みなみ | |
・佐伯麗音 | |
・森嶋ななか | |
・近江遙 | |
・支倉かさね |