2012-04-03から1日間の記事一覧

AOJ_1031 Simple GUI Application

問題 解法 構文解析するだけ。 しなくてもできそう。 解析したあとは、再帰で一番上のパネルを求めることができる #include <cstdio> #include <string> #include <vector> #include <algorithm> using namespace std; //タグ class T{ public: string name; int x1, y1, x2, y2; vector<T> ko; //</t></algorithm></vector></string></cstdio>…

AOJ_1028 ICPC: Ideal Coin Payment and Change

問題 解法 代金をpとすると,実際に払う金額Pは p だから,全部ためしていくといい. #include <cstdio> #include <algorithm> using namespace std; #define REP(i,n) for(int i=0;i</algorithm></cstdio>