intさわだんのBlack History

刹那的レジェンドになりたい。

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

ICPC 模擬国内2005F Gather the Maps AOJ 2011

問題文 judge.u-aizu.ac.jp解法は自明なので書きません setを乱用すれば簡単に解ける #include <bits/stdc++.h> using namespace std; int n; bool day[35][55]; int main(){ while(true){ cin >> n; if(n == 0)break; for(int i = 1;i <= n;i++){ int f; cin >> f; for(int</bits/stdc++.h>…

ICPC 模擬国内2007D スクウェア・ルート AOJ2015

judge.u-aizu.ac.jpあらかじめ考えられるすべての辺の長さをキーに、その長さの出現回数を値にして保存しておけばよい。大きめの配列を使えばいいがmapを使った。 #include <bits/stdc++.h> using namespace std; int n,m; int h[1600],w[1600]; int main(){ while(true){ c</bits/stdc++.h>…

AOJ 0178 テトリス

reading-hard & 実装に工夫が必要 #include <iostream> #include <algorithm> #include <vector> #include <set> using namespace std; int n; int h[7]; bool m[6010][7]; int b[1010][5]; int main() { while (true) { cin >> n; if (n == 0) break; for (int i = 0; i < 5500; i++) { for (</set></vector></algorithm></iostream>…