2011-03-29から1日間の記事一覧

SRM448 div2 hard

メモ化再起。マークでは色なので気をつけてください。 #include <cstring> #include <string> #include <vector> #define MOD 1234567891 typedef long long LL; using namespace std; class TheCardLineDivTwo { public: int n; LL cache[13][2][(1<<16)]; vector<string> cards; char m2n(ch</string></vector></string></cstring>…

SRM355 div2 hard

自作クラスでsortとかを使う場合は bool operator<(const C &c) const{ return hoge; } ってしないとコンパイルできない #include <algorithm> #include <vector> using namespace std; class LIQUID { public: int p,a; bool operator<(const LIQUID &l) const{ return p<l.p; } }; class MixingLiquids { public: double howMuch(vector <int> perce</l.p;></vector></algorithm>…

SRM430 div2 hard

久しぶりにマイ・ドストライクコースことメモ化再起するだけの問題 #include <cstring> #include <string> #include <vector> using namespace std; class ImageTraders { public: int N; vector<string> price; int cache[20][20][(1<<15)]; int rec(int from,int nowPrice,int left) { int &</string></vector></string></cstring>…

xtwitterをインストールした

Xtwitter - cuspy wiki その 5 ソースからコンパイルに挑戦したんだけど失敗したので.debを使った

SRM373 div2 hard

殺す気か!めちゃめちゃしんどい。 線分の交差判定は検索して出てきた (x1-x2)*(y-y1)+(y1-y2)*(x1-x) これを使ったんだけど線分と長方形の辺が一致する場合のみ別に考える必要がある 参考にさせていただいたサイト: Algorithmの中の”第16回 もっと簡単に−…

conkyをインストールしてみた(ソースから)

2000 sudo apt-get update 2002 mkdir work 2004 cd work 2006 mv /home/hogeo/Downloads/conky-1.8.1.tar.bz2 . 2008 tar jxvf conky-1.8.1.tar.bz2 2010 cd conky-1.8.1/ 2016 sudo apt-get install libx11-dev 2023 sudo apt-get install lua5.1 2029 sud…

AOJ0117

ワーシャルフロイドするだけ。 scanf("%d,%d,%d,%d"......が便利だった #include <algorithm> #include <cstdio> using namespace std; int dist[20][20]; int main() { int n,m; scanf("%d%d",&n,&m); for(int i=0;i</cstdio></algorithm>