0w1

Entries from 2016-03-16 to 1 day

JOI 13 本選 IOI Manju ( DP )

IOI Manju | Aizu Online Judge なんか難しいものから逃げてばかりな感じで不安。。。 #include <bits/stdc++.h> using namespace std; const int MAXM = 1e4 + 4; const int MAXN = 500 + 2; const int MAXPCE = 1e4 + 4; const int INF = 0x3f3f3f3f; int m, n; int p[ MA</bits/stdc++.h>…

JOI 14 予選 Treasures ( MLE Discretized Segment Tree )

Treasures | Aizu Online Judge It's easy to see that we will have to split them into two equal size sets and update the answer for each set to set. Since there are three options for each item, we will have to enumerate all 3 ^ |s| possible …

JOI 14 予選 Sandcastle ( BFS )

Sandcastle | Aizu Online Judge 更新されたマスだけまたqueueに入れる。バグ取るのに手間取った。 #include <bits/stdc++.h> using namespace std; const int MAXH = 1e3 + 3; const int MAXW = 1e3 + 3; typedef pair<int, int> pii; const int dx[] = { 0, 1, 0, -1, -1, 1, -1, 1 </int,></bits/stdc++.h>…

JOI 14 予選 Silk Road ( DP )

Silk Road | Aizu Online Judge dp[ i ]: now on city i, minimum cost #include <bits/stdc++.h> using namespace std; const int MAXN = 1e3 + 3; const int MAXM = 1e3 + 3; const int MAXC = 1e3 + 3; const int MAXD = 1e3 + 3; const int INF = 0x3f3f3f3f; void upmi</bits/stdc++.h>…