hiho week 87 register

Ended

Participants:392

Verdict:Accepted
Score:100 / 100
Submitted:2016-03-02 18:43:44

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <map>
using namespace std;
void goo() {
    string s;
    vector<string> stk;
    for(;;) {
        cin >> s;
        if(s=="(") stk.push_back(s);
        else if(s==")") {
            stk.pop_back();
            if(stk.empty()) return;
        } else if(stk.empty()) {
            if(s[0]>='0'&&s[0]<='9') {
                return ;
            } else if(s=="true" || s=="false") {
                return ;
            } else if(s!="if"&&s!="let") {
                return;
            }
        }
    }
    return ;
}
map<string,vector<pair<int,string> > > vars;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX