hiho week 176 register

Ended

Participants:281

Verdict:Accepted
Score:100 / 100
Submitted:2017-11-13 17:18:36

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<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<map>
#include<ctype.h>
#include<iostream>
#include<algorithm>
#include<set>
using namespace std;
map<int, int>mp;
string c[30];
set<char>s;
bool check(int a, string op, int b){
    if(op == "<") return a < b;
    else return a <= b;
}
int get_val(string s, int& pos){
    int ans = 0;
    for(; isdigit(s[pos]) && !isalpha(s[pos]); ans*=10, ans+=s[pos++]-'0');
    if(isalpha(s[pos])) ans += mp[s[pos++]];
    return ans;
}
string get_op(string s, int& pos){
    string res="";
    for( ; ispunct(s[pos]); res+=s[pos++]);
    return res;
}
bool solve(int n){
    //int j = 0;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX