hiho week 176 register

Ended

Participants:281

Verdict:Accepted
Score:100 / 100
Submitted:2017-11-16 15:41:20

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 <cstdio>
#include <map>
using namespace std;
const int maxn = 20;
map<char, int> m;
int n;
string c[maxn];
int get(string s, int &i) {
    int temp = 0;
    while (i < s.size() && s[i] >= '0' && s[i] <= '9') {
        temp = temp * 10 + (s[i] - '0');
        i++;
    }
    if (temp != 0)
        return temp;
    return m[s[i++]];
}
bool check_one(string s) {
    int i = 0;
    int a = get(s, i);
    int b;
    while (i < s.size()) {\
        if (s[i] == '<' && i + 1 < s.size() && s[i+1] == '=') {
            i += 2;
            b = get(s, i);
            if (a > b)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX