構文解析

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_1155 How can I satisfy thee? Let me count the ways...

問題 解法 P,Q,Rの値の組み合わせの総数は3^3=27通りなのでそれぞれに対して、 真になるか判定する。 構文解析は初めてだったのでちょっとてこずった。 #include <cstdio> #include <algorithm> using namespace std; int P, Q, R; char f[81]; int p; int formula(){ int val1,</algorithm></cstdio>…