QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#438556#4400. HomeworkSmilingBraniac#100 ✓240ms378016kbC++141.6kb2024-06-10 19:24:122024-06-10 19:24:12

Judging History

你现在查看的是最新测评结果

  • [2024-06-10 19:24:12]
  • 评测
  • 测评结果:100
  • 用时:240ms
  • 内存:378016kb
  • [2024-06-10 19:24:12]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
using R = vector<int>;

R mn(R r1, R r2) {
    int a = r1[0], b = r1[1], s1 = r1[2], c = r2[0], d = r2[1], s2 = r2[2];
    return {min(a, c), b + d - 1, s1 + s2};
}

R mx(R r1, R r2) {
    int a = r1[0], b = r1[1], s1 = r1[2], c = r2[0], d = r2[1], s2 = r2[2];
    R r = mn({s1 + 1 - b, s1 + 1 - a, s1}, {s2 + 1 - d, s2 + 1 - c, s2});
    r[0] = s1 + s2 + 1 - r[0];
    r[1] = s1 + s2 + 1 - r[1];
    swap(r[0], r[1]);
    return r;
}

R f(string& s, vector<vector<int>>& sum, int x, int y, int cnt) {
    if (x == y) return {1, 1, 1};
    int type = 0;
    if (s[x + 1] == 'a') type++;
    auto it = upper_bound(sum[cnt].begin(), sum[cnt].end(), x);
    if (it == sum[cnt].end() || *it >= y) {
        if (type) return {2, 2, 2};
        else return {1, 1, 2};
    }
    else if (*it + 1 == y) {
        if (type) return mx({1, 1, 1}, f(s, sum, x + 6, y - 1, cnt + 1));
        else return mn({1, 1, 1}, f(s, sum, x + 6, y - 1, cnt + 1));
    }
    else {
        if (type) return mx(f(s, sum, x + 4, *it, cnt + 1), f(s, sum, *it + 2, y - 1, cnt + 1));
        else return mn(f(s, sum, x + 4, *it, cnt + 1), f(s, sum, *it + 2, y - 1, cnt + 1));
    }
}

int main() {
    string s; cin >> s;
    int n = s.size();
    vector<vector<int>> sum(n);///
    int cnt = 0;
    for (int i = 0; i < n; ++i) {
        if (s[i] == '(') cnt++;
        if (s[i] == ')') sum[--cnt].push_back(i);
    }
    R r = f(s, sum, 0, n - 1, 1);
    cout << r[1] - r[0] + 1;
    //cout << r[0] << ' ' <<r[1] << ' ' << r[2] << '\n';
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 0ms
memory: 3592kb

input:

min(max(?,max(min(?,min(?,?)),?)),min(max(?,?),max(?,?)))

output:

6

result:

ok single line: '6'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

max(max(?,min(max(?,min(?,?)),?)),max(max(?,?),max(?,?)))

output:

4

result:

ok single line: '4'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3468kb

input:

min(min(min(?,min(?,?)),min(?,?)),min(?,min(min(?,?),?)))

output:

1

result:

ok single line: '1'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

max(max(max(?,?),?),max(max(?,?),min(max(?,?),max(?,?))))

output:

3

result:

ok single line: '3'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

min(max(?,min(?,?)),max(min(max(?,?),?),min(max(?,?),?)))

output:

6

result:

ok single line: '6'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

max(max(?,min(max(?,?),?)),max(max(max(?,?),min(?,?)),?))

output:

4

result:

ok single line: '4'

Test #7:

score: 0
Accepted
time: 0ms
memory: 3516kb

input:

min(min(max(min(?,?),?),?),min(?,max(max(?,?),min(?,?))))

output:

6

result:

ok single line: '6'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

min(min(min(min(?,?),max(?,?)),min(min(?,?),min(?,?))),?)

output:

2

result:

ok single line: '2'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

max(max(?,?),max(max(max(?,?),max(?,?)),max(?,max(?,?))))

output:

1

result:

ok single line: '1'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

min(max(min(?,?),?),max(min(?,max(min(max(?,?),?),?)),?))

output:

7

result:

ok single line: '7'

Test #11:

score: 0
Accepted
time: 0ms
memory: 3768kb

input:

max(?,min(max(?,min(?,?)),max(max(?,?),min(?,max(?,?)))))

output:

7

result:

ok single line: '7'

Test #12:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

min(min(max(?,?),?),max(max(?,min(max(?,?),?)),max(?,?)))

output:

7

result:

ok single line: '7'

Test #13:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

min(min(min(?,?),min(?,max(?,?))),min(?,min(?,min(?,?))))

output:

2

result:

ok single line: '2'

Test #14:

score: 0
Accepted
time: 0ms
memory: 3512kb

input:

min(max(max(?,?),max(?,max(max(?,?),max(?,?)))),max(?,?))

output:

7

result:

ok single line: '7'

Test #15:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

max(min(?,?),min(max(min(?,?),min(?,max(?,min(?,?)))),?))

output:

7

result:

ok single line: '7'

Test #16:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

min(?,min(?,max(max(max(min(?,min(min(?,?),?)),?),?),?)))

output:

7

result:

ok single line: '7'

Test #17:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

min(?,min(?,max(?,max(min(min(min(?,min(?,?)),?),?),?))))

output:

7

result:

ok single line: '7'

Test #18:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

min(?,min(min(min(?,min(?,min(?,min(min(?,?),?)))),?),?))

output:

1

result:

ok single line: '1'

Test #19:

score: 0
Accepted
time: 0ms
memory: 3816kb

input:

max(max(max(?,max(?,max(?,max(?,max(max(?,?),?))))),?),?)

output:

1

result:

ok single line: '1'

Test #20:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

min(max(?,min(max(min(max(min(?,max(?,?)),?),?),?),?)),?)

output:

8

result:

ok single line: '8'

Test #21:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

min(min(?,?),min(min(min(?,?),min(min(?,min(?,?)),?)),?))

output:

1

result:

ok single line: '1'

Test #22:

score: 0
Accepted
time: 0ms
memory: 3764kb

input:

max(max(max(?,?),max(max(?,?),?)),max(max(?,?),max(?,?)))

output:

1

result:

ok single line: '1'

Test #23:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

min(max(?,min(max(?,?),?)),min(?,min(?,min(?,max(?,?)))))

output:

5

result:

ok single line: '5'

Test #24:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

min(?,max(min(min(max(?,?),?),max(?,?)),min(min(?,?),?)))

output:

6

result:

ok single line: '6'

Test #25:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

min(min(min(?,?),max(?,?)),min(min(?,?),min(?,?)))

output:

2

result:

ok single line: '2'

Test #26:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

min(min(min(?,?),min(?,?)),min(min(?,?),min(?,?)))

output:

1

result:

ok single line: '1'

Test #27:

score: 0
Accepted
time: 0ms
memory: 3516kb

input:

max(min(max(?,?),max(?,?)),min(max(?,?),max(?,?)))

output:

4

result:

ok single line: '4'

Test #28:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

max(?,?)

output:

1

result:

ok single line: '1'

Subtask #2:

score: 13
Accepted

Dependency #1:

100%
Accepted

Test #29:

score: 13
Accepted
time: 0ms
memory: 3580kb

input:

min(max(min(?,max(?,max(?,?))),min(min(?,min(?,?)),?)),min(max(?,max(?,?)),min(min(?,?),min(min(?,?),?))))

output:

9

result:

ok single line: '9'

Test #30:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

max(min(max(?,max(max(?,max(?,?)),?)),max(?,min(?,?))),min(max(?,min(?,?)),min(min(?,?),max(min(?,?),?))))

output:

13

result:

ok single line: '13'

Test #31:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

min(max(min(?,min(?,?)),min(min(?,min(?,?)),min(min(?,?),?))),min(min(?,?),min(max(?,?),min(min(?,?),?))))

output:

8

result:

ok single line: '8'

Test #32:

score: 0
Accepted
time: 0ms
memory: 3512kb

input:

max(max(min(?,?),max(?,max(?,max(min(?,?),?)))),min(max(max(?,max(?,?)),max(?,?)),max(max(?,?),max(?,?))))

output:

8

result:

ok single line: '8'

Test #33:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

min(max(min(?,max(?,?)),min(max(min(?,?),?),max(?,?))),max(min(?,max(?,?)),min(max(min(?,?),?),max(?,?))))

output:

11

result:

ok single line: '11'

Test #34:

score: 0
Accepted
time: 0ms
memory: 3508kb

input:

max(min(?,?),min(?,min(?,min(min(max(min(?,?),min(?,?)),max(?,min(min(?,?),max(?,?)))),max(?,min(?,?))))))

output:

14

result:

ok single line: '14'

Test #35:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

max(min(?,max(?,min(?,?))),min(min(max(?,?),min(?,max(min(max(?,min(?,?)),?),min(?,max(max(?,?),?))))),?))

output:

14

result:

ok single line: '14'

Test #36:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

min(min(?,?),min(min(min(min(?,min(min(?,?),min(min(?,?),?))),min(?,min(?,?))),max(?,min(min(?,?),?))),?))

output:

4

result:

ok single line: '4'

Test #37:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

max(max(max(max(max(?,?),max(?,?)),max(max(?,?),max(?,?))),max(?,max(?,max(?,?)))),max(min(?,?),max(?,?)))

output:

2

result:

ok single line: '2'

Test #38:

score: 0
Accepted
time: 1ms
memory: 3604kb

input:

min(max(min(max(?,?),max(?,?)),min(max(min(?,?),min(max(?,?),max(?,?))),max(?,?))),max(min(?,?),min(?,?)))

output:

12

result:

ok single line: '12'

Test #39:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

max(min(max(?,?),max(min(?,?),max(max(?,?),min(?,max(?,max(?,?)))))),min(max(max(?,?),?),max(?,max(?,?))))

output:

11

result:

ok single line: '11'

Test #40:

score: 0
Accepted
time: 0ms
memory: 3592kb

input:

max(max(?,max(max(?,min(max(min(?,min(?,max(?,?))),min(?,?)),min(max(?,?),max(?,?)))),min(?,max(?,?)))),?)

output:

11

result:

ok single line: '11'

Test #41:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

min(max(max(min(min(?,?),?),min(min(min(?,min(?,?)),?),min(?,min(?,?)))),min(min(?,?),?)),min(min(?,?),?))

output:

11

result:

ok single line: '11'

Test #42:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

max(max(?,max(?,?)),max(max(max(max(max(min(?,max(?,?)),max(max(?,?),?)),?),max(?,?)),?),max(?,max(?,?))))

output:

3

result:

ok single line: '3'

Test #43:

score: 0
Accepted
time: 0ms
memory: 3468kb

input:

min(max(min(max(?,min(max(?,?),?)),max(min(max(min(?,max(?,?)),?),max(?,?)),?)),?),max(min(?,?),min(?,?)))

output:

13

result:

ok single line: '13'

Test #44:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

max(?,max(?,max(min(min(max(?,max(?,max(max(?,max(?,min(max(?,min(?,min(max(?,?),?))),?))),?))),?),?),?)))

output:

13

result:

ok single line: '13'

Test #45:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

max(min(max(max(min(min(?,min(min(min(?,min(?,max(?,min(max(?,min(max(?,?),?)),?)))),?),?)),?),?),?),?),?)

output:

15

result:

ok single line: '15'

Test #46:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

min(max(min(?,min(?,min(min(min(?,min(min(?,min(min(min(?,min(min(min(?,?),?),?)),?),?)),?)),?),?))),?),?)

output:

15

result:

ok single line: '15'

Test #47:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

max(max(?,max(max(max(max(?,max(?,max(?,max(max(min(max(?,max(?,max(?,max(?,?)))),?),?),?)))),?),?),?)),?)

output:

6

result:

ok single line: '6'

Test #48:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

max(min(?,max(?,min(?,max(?,min(?,max(?,min(max(?,min(max(?,min(max(?,min(max(?,?),?)),?)),?)),?))))))),?)

output:

15

result:

ok single line: '15'

Test #49:

score: 0
Accepted
time: 0ms
memory: 3508kb

input:

min(min(min(?,min(?,?)),?),min(min(?,?),min(min(?,min(?,?)),min(min(min(min(?,?),?),min(min(?,?),?)),?))))

output:

1

result:

ok single line: '1'

Test #50:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

max(?,max(max(max(?,?),max(max(?,max(?,max(?,?))),?)),max(?,max(max(max(?,?),max(?,max(max(?,?),?))),?))))

output:

1

result:

ok single line: '1'

Test #51:

score: 0
Accepted
time: 0ms
memory: 3596kb

input:

max(max(min(?,?),max(?,max(min(max(?,?),min(?,?)),min(?,?)))),max(max(max(min(?,?),?),max(?,?)),min(?,?)))

output:

8

result:

ok single line: '8'

Test #52:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

max(min(max(?,min(max(?,?),?)),max(min(max(?,?),min(?,?)),?)),min(min(?,?),min(min(min(min(?,?),?),?),?)))

output:

13

result:

ok single line: '13'

Test #53:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

max(min(max(max(?,?),min(?,?)),min(max(?,?),max(?,?))),min(max(max(?,?),min(?,?)),min(max(?,?),min(?,?))))

output:

12

result:

ok single line: '12'

Test #54:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

min(min(min(min(?,?),min(?,?)),min(min(?,?),min(?,?))),min(min(min(?,?),min(?,?)),min(min(?,?),min(?,?))))

output:

1

result:

ok single line: '1'

Test #55:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

min(max(min(max(?,?),max(?,?)),min(max(?,?),max(?,?))),max(min(max(?,?),max(?,?)),min(max(?,?),max(?,?))))

output:

10

result:

ok single line: '10'

Test #56:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

max(?,?)

output:

1

result:

ok single line: '1'

Subtask #3:

score: 13
Accepted

Test #57:

score: 13
Accepted
time: 195ms
memory: 377204kb

input:

min(?,min(?,min(min(min(min(?,min(min(?,min(?,min(?,min(min(?,min(?,min(min(?,min(min(?,min(?,min(?,min(min(?,min(min(?,min(min(?,min(?,min(?,min(min(?,min(min(?,min(min(min(min(?,min(min(min(min(min(?,min(min(?,min(min(?,min(?,min(?,min(?,min(min(?,min(?,min(?,min(?,min(min(?,min(?,min(?,min(min(mi...

output:

1

result:

ok single line: '1'

Test #58:

score: 0
Accepted
time: 240ms
memory: 377340kb

input:

max(max(max(max(max(max(max(?,max(max(max(?,max(?,max(max(max(max(max(?,max(?,max(max(?,max(max(?,max(?,max(max(max(max(max(max(max(max(max(max(?,max(?,max(?,max(?,max(max(?,max(max(max(?,max(?,max(?,max(max(max(max(max(max(max(max(?,max(?,max(max(max(?,max(?,max(?,max(?,max(?,max(?,max(max(max(?,ma...

output:

1

result:

ok single line: '1'

Test #59:

score: 0
Accepted
time: 200ms
memory: 377344kb

input:

max(?,max(min(max(max(max(max(max(min(?,min(?,min(?,max(?,max(?,min(max(max(?,max(max(max(?,max(?,max(min(max(?,min(max(max(?,max(max(?,max(?,max(min(?,max(min(?,min(?,max(?,min(min(?,max(max(min(?,min(max(max(min(min(?,min(?,max(?,min(?,min(min(max(min(?,min(min(?,max(?,min(?,max(?,max(?,min(min(ma...

output:

999998

result:

ok single line: '999998'

Test #60:

score: 0
Accepted
time: 215ms
memory: 377224kb

input:

min(min(min(?,max(min(min(?,max(?,min(?,max(?,max(?,min(max(max(max(min(?,max(max(min(?,max(?,max(?,max(max(?,max(min(?,max(?,min(max(min(?,max(min(min(?,min(?,max(?,min(?,max(max(max(?,min(?,max(?,max(?,min(?,min(?,max(max(max(?,min(?,min(?,min(max(?,max(?,min(min(?,min(max(max(?,min(min(?,min(min(...

output:

999997

result:

ok single line: '999997'

Test #61:

score: 0
Accepted
time: 195ms
memory: 377224kb

input:

max(min(min(?,min(min(max(?,min(?,max(min(min(?,max(min(?,min(?,min(min(?,min(min(min(min(?,min(min(min(min(min(min(min(min(min(min(?,min(min(?,min(?,min(max(min(?,min(?,min(?,min(?,min(?,min(?,min(min(min(min(?,min(min(min(?,min(?,max(min(?,min(?,min(min(max(?,max(min(?,min(?,min(min(max(min(?,min(...

output:

999999

result:

ok single line: '999999'

Test #62:

score: 0
Accepted
time: 191ms
memory: 377220kb

input:

min(min(max(max(?,min(min(max(?,min(min(min(?,min(?,min(min(min(min(min(min(min(?,min(min(?,max(?,min(min(?,min(?,min(min(?,min(min(min(?,min(?,max(?,min(min(?,min(?,min(min(min(?,min(?,max(?,min(min(?,min(min(?,max(?,min(?,min(?,min(min(max(?,min(max(max(?,min(min(min(?,min(min(?,min(min(min(max(mi...

output:

999998

result:

ok single line: '999998'

Test #63:

score: 0
Accepted
time: 213ms
memory: 377412kb

input:

max(max(max(?,max(max(?,max(max(max(max(?,max(?,max(?,max(?,max(?,max(?,max(max(?,max(?,max(?,max(?,max(?,max(max(max(max(max(?,max(?,max(max(?,max(?,max(max(max(max(?,max(max(?,min(?,max(?,max(max(max(max(max(?,min(max(min(?,max(?,max(?,max(?,max(?,max(max(max(?,max(?,max(?,max(?,min(?,max(max(?,mi...

output:

999965

result:

ok single line: '999965'

Test #64:

score: 0
Accepted
time: 224ms
memory: 377160kb

input:

max(max(?,max(?,max(max(?,max(?,max(max(?,max(min(max(?,max(?,min(?,max(?,max(max(?,max(max(max(max(max(?,max(?,max(?,max(max(?,max(max(max(max(max(min(min(?,max(max(?,min(?,max(max(?,max(max(?,max(?,min(max(?,max(max(min(max(?,max(?,max(max(max(max(max(max(max(max(max(?,min(max(?,max(?,max(min(max(...

output:

999991

result:

ok single line: '999991'

Test #65:

score: 0
Accepted
time: 212ms
memory: 377224kb

input:

min(?,max(?,min(?,max(min(?,max(?,min(max(min(?,max(min(max(?,min(?,max(min(?,max(min(?,max(?,min(max(min(?,max(?,min(max(min(?,max(min(?,max(?,min(max(?,min(max(?,min(?,max(min(?,max(?,min(?,max(min(max(?,min(?,max(min(max(?,min(max(?,min(?,max(?,min(?,max(min(max(?,min(?,max(?,min(max(?,min(?,max(...

output:

999999

result:

ok single line: '999999'

Test #66:

score: 0
Accepted
time: 220ms
memory: 377180kb

input:

min(max(min(?,max(?,min(max(?,min(max(min(?,max(min(max(min(max(?,min(?,max(?,min(max(?,min(?,max(?,min(max(min(max(?,min(?,max(min(max(min(?,max(min(max(min(?,max(min(?,max(min(?,max(min(max(?,min(max(?,min(max(min(?,max(?,min(max(min(?,max(min(?,max(min(max(min(?,max(?,min(?,max(?,min(max(?,min(ma...

output:

999999

result:

ok single line: '999999'

Test #67:

score: 0
Accepted
time: 215ms
memory: 377144kb

input:

max(min(?,max(min(max(min(max(min(max(?,min(max(?,min(?,max(min(max(min(?,max(?,min(?,max(min(max(min(?,max(?,min(?,max(?,min(?,max(?,min(max(?,min(?,max(min(?,max(min(?,max(?,min(max(?,min(max(min(max(?,min(?,max(?,min(max(min(max(min(max(?,min(max(?,min(?,max(min(?,max(?,min(max(min(?,max(?,min(?,...

output:

999999

result:

ok single line: '999999'

Test #68:

score: 0
Accepted
time: 203ms
memory: 377292kb

input:

min(max(?,min(max(min(?,max(?,min(?,max(min(max(min(max(?,min(max(?,min(?,max(min(max(?,min(max(?,min(max(?,min(?,max(min(?,max(min(?,max(?,min(max(min(max(?,min(max(min(?,max(?,min(max(min(?,max(min(max(?,min(max(min(?,max(min(max(?,min(?,max(?,min(?,max(?,min(max(?,min(?,max(?,min(?,max(min(max(mi...

output:

999999

result:

ok single line: '999999'

Test #69:

score: 0
Accepted
time: 0ms
memory: 3764kb

input:

max(?,?)

output:

1

result:

ok single line: '1'

Subtask #4:

score: 30
Accepted

Dependency #2:

100%
Accepted

Test #70:

score: 30
Accepted
time: 1ms
memory: 3428kb

input:

max(min(min(min(min(min(min(min(min(?,max(?,?)),max(max(min(?,?),min(?,?)),max(?,?))),max(min(?,min(?,?)),max(?,min(max(?,min(?,?)),?)))),min(max(max(min(min(?,?),?),min(?,?)),min(?,min(?,?))),min(max(?,?),min(min(?,max(?,?)),max(?,?))))),min(max(max(max(?,max(max(?,?),?)),min(min(?,?),min(?,?))),ma...

output:

982

result:

ok single line: '982'

Test #71:

score: 0
Accepted
time: 1ms
memory: 3824kb

input:

min(min(min(min(max(min(max(min(min(min(?,?),?),min(max(?,min(?,?)),min(?,max(?,?)))),max(min(min(?,?),?),min(min(?,?),max(?,max(?,?))))),min(min(min(?,min(?,?)),max(min(?,max(?,?)),?)),min(max(?,max(min(?,?),?)),max(max(min(?,?),?),?)))),max(min(max(max(max(?,?),?),max(max(?,?),?)),min(max(?,min(?,...

output:

982

result:

ok single line: '982'

Test #72:

score: 0
Accepted
time: 1ms
memory: 3592kb

input:

min(min(min(min(min(min(min(min(min(?,min(?,?)),min(max(?,?),min(?,min(?,?)))),min(min(min(min(?,?),?),?),min(min(?,?),min(?,?)))),min(min(min(?,?),min(?,min(min(?,?),?))),min(min(min(min(?,?),?),?),min(min(?,min(?,?)),?)))),min(min(min(min(?,max(?,?)),max(?,min(?,min(min(?,?),?)))),min(min(min(?,?)...

output:

399

result:

ok single line: '399'

Test #73:

score: 0
Accepted
time: 1ms
memory: 3592kb

input:

max(max(max(max(max(max(max(max(max(max(?,?),max(max(?,?),?)),max(max(?,?),?)),max(max(?,max(?,?)),max(?,max(max(?,?),?)))),max(max(max(?,max(max(min(?,?),?),?)),max(?,max(?,?))),max(max(max(?,?),max(max(?,?),?)),max(max(?,max(?,?)),?)))),max(max(max(max(?,max(?,?)),max(?,max(?,max(?,?)))),min(max(m...

output:

420

result:

ok single line: '420'

Test #74:

score: 0
Accepted
time: 1ms
memory: 3752kb

input:

max(min(max(min(max(min(max(min(max(min(?,?),min(?,?)),max(min(?,?),?)),min(max(min(?,?),?),max(min(?,max(min(?,?),?)),min(?,?)))),max(min(max(min(max(?,?),?),?),max(min(max(?,?),?),?)),min(max(?,min(?,?)),max(min(?,max(?,?)),?)))),min(max(min(max(min(max(?,?),?),?),max(?,min(max(?,?),?))),min(max(?...

output:

954

result:

ok single line: '954'

Test #75:

score: 0
Accepted
time: 1ms
memory: 3604kb

input:

max(max(max(max(max(min(max(?,max(?,min(?,?))),?),min(min(?,max(max(?,?),?)),max(?,max(min(max(min(min(?,?),?),?),?),max(max(max(min(?,?),?),?),min(min(?,max(min(?,?),max(?,?))),min(min(?,max(min(max(?,?),min(?,min(max(max(max(?,min(?,?)),min(?,?)),max(max(?,max(max(min(?,min(?,min(?,?))),max(min(mi...

output:

993

result:

ok single line: '993'

Test #76:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

min(min(?,?),min(min(max(min(?,?),min(?,?)),min(min(?,max(max(max(?,?),?),max(max(min(?,?),min(max(?,max(?,?)),max(max(?,max(max(max(?,max(max(max(min(min(?,?),min(?,max(?,?))),min(max(min(max(?,?),?),?),max(min(max(min(?,?),?),max(?,min(min(min(?,?),min(?,?)),min(max(max(max(?,?),min(?,?)),?),max(m...

output:

993

result:

ok single line: '993'

Test #77:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

min(min(min(min(?,?),min(min(min(?,min(?,?)),?),max(min(max(min(?,?),?),min(?,?)),min(min(?,?),min(min(min(min(min(?,?),?),min(min(min(min(?,min(?,?)),min(min(min(?,?),min(max(?,?),?)),min(min(max(min(?,?),?),min(min(min(min(min(min(min(min(?,?),?),?),min(min(?,min(max(min(min(min(?,min(min(?,?),min...

output:

987

result:

ok single line: '987'

Test #78:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

max(max(max(max(max(max(max(?,?),max(?,?)),max(max(max(?,?),?),max(max(max(min(?,?),?),?),max(max(max(max(?,?),?),max(max(max(max(max(max(max(?,max(?,?)),max(max(max(max(?,max(?,?)),max(max(?,max(max(?,max(?,?)),max(max(max(min(max(min(max(?,?),?),?),?),max(max(max(?,max(max(max(min(min(?,max(max(ma...

output:

912

result:

ok single line: '912'

Test #79:

score: 0
Accepted
time: 1ms
memory: 3872kb

input:

max(?,min(max(min(?,?),?),max(min(max(min(?,max(?,?)),?),?),min(max(?,?),max(min(max(?,min(max(?,?),?)),?),min(max(min(max(min(max(min(max(min(?,?),?),max(?,min(max(?,min(max(?,?),max(?,?))),max(min(?,max(?,min(?,max(?,?)))),min(max(min(?,?),min(?,?)),max(min(?,max(?,min(?,?))),min(max(min(?,max(?,?...

output:

998

result:

ok single line: '998'

Test #80:

score: 0
Accepted
time: 1ms
memory: 3596kb

input:

max(min(min(min(max(?,min(min(?,?),max(?,?))),min(min(?,?),?)),max(?,max(max(min(max(?,?),?),min(max(?,?),?)),min(?,min(max(?,?),max(max(?,?),min(?,?))))))),max(?,max(min(min(max(max(max(?,min(min(?,min(?,?)),?)),max(max(max(min(?,min(?,?)),max(?,?)),?),max(max(max(?,?),?),max(?,?)))),min(min(max(?,...

output:

991

result:

ok single line: '991'

Test #81:

score: 0
Accepted
time: 1ms
memory: 3608kb

input:

max(max(min(max(max(max(max(max(?,?),?),max(?,max(?,max(?,?)))),max(max(?,max(?,?)),?)),min(max(min(min(?,?),?),max(max(max(max(max(?,max(?,?)),?),max(?,?)),max(min(?,max(?,?)),?)),max(max(max(?,?),?),max(max(?,min(?,?)),max(?,max(?,?)))))),?)),max(max(min(min(max(min(max(min(min(?,max(max(?,?),min(...

output:

984

result:

ok single line: '984'

Test #82:

score: 0
Accepted
time: 1ms
memory: 3600kb

input:

min(max(min(min(min(min(min(min(?,?),min(?,min(?,?))),min(?,min(max(?,?),?))),min(min(min(min(min(?,min(?,min(?,?))),min(min(min(min(?,?),min(?,?)),min(?,min(?,?))),min(max(min(min(?,?),min(?,?)),min(min(min(?,?),?),?)),max(min(min(min(min(?,min(?,?)),max(min(min(?,?),max(?,?)),min(?,?))),min(?,?)),...

output:

884

result:

ok single line: '884'

Test #83:

score: 0
Accepted
time: 1ms
memory: 3828kb

input:

max(min(max(max(max(max(max(max(?,?),?),?),max(max(?,max(?,?)),?)),max(max(?,max(min(max(?,max(max(?,?),?)),max(max(max(max(?,max(?,max(?,max(?,?)))),max(max(?,max(?,?)),max(?,max(max(max(?,?),max(?,max(?,?))),max(?,max(?,?)))))),min(max(?,?),max(?,?))),max(min(max(max(max(?,?),?),max(min(?,?),max(?...

output:

548

result:

ok single line: '548'

Test #84:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

min(max(min(max(min(max(min(max(?,min(max(?,?),?)),max(min(max(min(max(min(?,max(min(?,max(?,?)),?)),min(?,max(?,min(?,?)))),max(min(?,max(min(?,?),min(max(?,?),max(?,min(max(min(?,max(?,?)),min(?,?)),?))))),min(?,?))),min(?,max(?,?))),max(min(?,?),?)),min(max(min(max(?,?),max(?,min(?,?))),?),?))),m...

output:

987

result:

ok single line: '987'

Test #85:

score: 0
Accepted
time: 1ms
memory: 3784kb

input:

max(?,max(?,min(?,max(max(?,max(?,max(?,min(?,max(max(min(?,min(min(?,max(min(?,max(?,max(?,max(?,min(?,max(?,max(?,min(?,min(min(max(?,max(min(?,min(max(?,min(max(?,min(?,max(max(?,max(max(max(?,max(?,min(max(?,max(?,max(min(min(min(max(max(?,max(max(max(?,max(?,max(min(max(min(?,max(max(?,max(max(...

output:

998

result:

ok single line: '998'

Test #86:

score: 0
Accepted
time: 1ms
memory: 3720kb

input:

max(min(?,min(?,min(min(?,min(?,min(max(?,min(?,min(?,max(min(?,min(min(?,max(max(min(?,min(?,min(?,max(min(max(max(max(?,max(?,min(?,max(min(?,min(max(max(?,min(?,min(?,min(?,min(?,min(?,max(?,max(?,max(?,max(?,max(?,max(max(?,min(?,min(max(?,max(min(min(max(min(?,min(max(min(?,max(min(min(max(?,mi...

output:

999

result:

ok single line: '999'

Test #87:

score: 0
Accepted
time: 0ms
memory: 3776kb

input:

min(?,min(min(min(?,min(min(min(min(min(min(?,min(?,min(?,min(?,min(?,min(?,min(?,min(min(?,min(?,min(?,min(min(min(min(min(min(max(?,max(?,min(min(?,min(?,min(min(?,min(min(min(?,min(min(?,min(?,min(min(min(?,min(?,min(min(min(?,min(?,min(?,min(min(min(min(?,max(?,min(min(min(max(?,min(min(?,min(?,...

output:

974

result:

ok single line: '974'

Test #88:

score: 0
Accepted
time: 0ms
memory: 3784kb

input:

min(max(max(max(max(min(?,max(max(?,max(?,max(?,max(max(?,max(max(?,max(?,max(?,max(?,max(?,max(?,max(min(?,max(min(max(?,max(max(min(?,max(max(max(max(?,max(?,max(max(?,max(?,max(max(?,max(max(max(?,max(max(max(?,max(max(max(?,max(?,max(?,max(max(?,max(max(?,max(max(?,max(max(?,max(max(?,max(max(ma...

output:

999

result:

ok single line: '999'

Test #89:

score: 0
Accepted
time: 1ms
memory: 3972kb

input:

min(?,max(min(?,max(min(?,max(?,min(max(?,min(?,max(min(max(min(max(min(max(?,min(max(?,min(max(min(?,max(?,min(?,max(min(max(min(?,max(?,min(?,max(?,min(max(?,min(max(?,min(?,max(?,min(max(?,min(?,max(min(?,max(?,min(?,max(min(max(min(max(?,min(?,max(?,min(max(min(max(min(max(min(?,max(?,min(?,max(...

output:

999

result:

ok single line: '999'

Test #90:

score: 0
Accepted
time: 0ms
memory: 3600kb

input:

min(min(min(min(min(min(min(?,?),min(?,min(?,?))),min(min(?,min(?,?)),min(min(?,?),min(min(?,?),?)))),min(min(min(min(?,?),?),min(?,min(?,?))),min(min(min(?,min(min(?,?),?)),min(min(min(min(?,?),min(?,min(min(?,?),min(min(?,?),?)))),min(?,?)),min(?,min(?,?)))),min(?,min(?,?))))),min(min(min(min(min(...

output:

1

result:

ok single line: '1'

Test #91:

score: 0
Accepted
time: 1ms
memory: 3584kb

input:

max(max(max(max(max(max(?,?),?),max(max(?,?),max(max(max(?,?),?),?))),max(?,max(?,max(?,max(max(?,?),?))))),max(max(max(max(?,max(?,?)),max(max(max(max(max(?,?),?),max(?,max(?,max(?,?)))),max(?,?)),max(?,max(?,?)))),max(max(max(max(?,max(max(?,?),max(?,?))),max(max(?,max(max(?,?),?)),?)),max(max(max...

output:

1

result:

ok single line: '1'

Test #92:

score: 0
Accepted
time: 1ms
memory: 3604kb

input:

max(max(?,min(?,max(max(max(?,min(?,min(?,max(?,?)))),min(min(?,min(?,min(?,?))),min(min(?,?),?))),?))),max(min(max(max(min(min(?,?),max(?,?)),max(?,max(min(?,min(?,?)),max(?,min(min(?,max(?,?)),?))))),min(max(min(max(?,?),?),?),min(?,max(max(min(?,max(min(?,?),max(max(?,?),?))),max(min(?,min(?,?)),...

output:

992

result:

ok single line: '992'

Test #93:

score: 0
Accepted
time: 1ms
memory: 3484kb

input:

min(min(max(max(min(min(min(max(?,?),max(?,?)),max(?,?)),min(min(max(max(min(?,?),?),min(?,?)),max(?,min(?,?))),min(max(?,max(?,?)),min(?,?)))),min(max(min(min(?,?),max(max(min(max(?,?),min(min(max(?,max(?,?)),?),min(min(min(min(?,?),min(?,?)),?),min(max(?,?),max(?,max(max(min(max(?,?),?),min(?,?)),...

output:

992

result:

ok single line: '992'

Test #94:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,...

output:

999

result:

ok single line: '999'

Test #95:

score: 0
Accepted
time: 1ms
memory: 3676kb

input:

max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,...

output:

999

result:

ok single line: '999'

Test #96:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

max(min(min(max(min(min(max(max(min(?,?),min(?,?)),min(min(?,?),max(?,?))),max(min(max(?,?),max(?,?)),min(max(?,?),min(?,?)))),max(min(max(min(?,?),max(?,?)),max(min(?,?),min(?,?))),max(max(max(?,?),min(?,?)),max(max(?,?),max(?,?))))),min(max(max(max(max(?,?),min(?,?)),min(min(?,?),min(?,?))),min(ma...

output:

497

result:

ok single line: '497'

Test #97:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

min(min(min(min(min(min(min(min(min(?,?),min(?,?)),min(min(?,?),min(?,?))),min(min(min(?,?),min(?,?)),min(min(?,?),min(?,?)))),min(min(min(min(?,?),min(?,?)),min(min(?,?),min(?,?))),min(min(min(?,?),min(?,?)),min(min(?,?),min(?,?))))),min(min(min(min(max(?,?),min(?,?)),min(max(?,?),min(?,?))),min(ma...

output:

133

result:

ok single line: '133'

Test #98:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

max(min(max(min(max(min(max(min(max(?,?),max(?,?)),min(max(?,?),max(?,?))),max(min(max(?,?),max(?,?)),min(max(?,?),max(?,?)))),min(max(min(max(?,?),max(?,?)),min(max(?,?),max(?,?))),max(min(max(?,?),max(?,?)),min(max(?,?),max(?,?))))),max(min(max(min(max(?,?),max(?,?)),min(max(?,?),max(?,?))),max(mi...

output:

466

result:

ok single line: '466'

Test #99:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

max(?,?)

output:

1

result:

ok single line: '1'

Subtask #5:

score: 34
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #100:

score: 34
Accepted
time: 183ms
memory: 180272kb

input:

min(max(max(min(min(min(max(max(min(min(max(min(min(min(max(max(min(max(max(min(?,?),?),min(?,min(min(?,?),?))),max(max(max(?,?),?),max(min(?,?),?))),max(max(max(max(?,?),min(?,?)),max(?,min(max(?,?),?))),max(max(max(?,min(?,?)),min(?,?)),max(?,min(?,?))))),min(max(min(min(max(?,max(?,?)),?),min(?,?...

output:

999923

result:

ok single line: '999923'

Test #101:

score: 0
Accepted
time: 186ms
memory: 180196kb

input:

max(max(min(min(min(min(max(max(min(min(max(min(max(min(min(max(max(max(min(?,?),max(max(?,?),max(?,?))),max(min(max(?,?),?),max(?,max(max(?,?),min(?,?))))),max(max(max(max(?,?),?),min(min(?,?),min(min(?,?),?))),min(min(max(?,?),max(?,?)),min(max(?,?),min(?,?))))),min(max(max(min(min(?,max(?,?)),?),...

output:

999801

result:

ok single line: '999801'

Test #102:

score: 0
Accepted
time: 189ms
memory: 180900kb

input:

max(min(min(min(min(min(min(min(min(min(min(min(min(min(min(min(min(max(min(min(?,?),?),min(min(?,min(?,min(?,?))),min(?,?))),min(min(?,min(?,?)),min(min(?,?),min(?,?)))),min(min(min(?,?),min(min(?,?),min(?,?))),min(min(?,min(min(?,?),min(?,?))),max(min(min(?,?),?),?)))),min(min(min(min(min(?,?),min...

output:

848294

result:

ok single line: '848294'

Test #103:

score: 0
Accepted
time: 181ms
memory: 180208kb

input:

max(max(max(max(max(max(max(max(max(max(max(min(min(max(max(max(max(max(max(?,max(?,max(?,max(?,?)))),max(max(?,?),?)),max(max(max(?,?),max(?,?)),max(?,?))),max(max(max(max(?,?),?),min(?,max(?,?))),max(max(max(?,?),max(?,?)),max(max(max(?,?),?),max(?,?))))),max(max(min(min(max(?,?),max(?,?)),min(?,m...

output:

717575

result:

ok single line: '717575'

Test #104:

score: 0
Accepted
time: 184ms
memory: 180132kb

input:

max(min(max(min(max(min(max(min(max(min(max(min(max(min(max(min(max(min(max(?,?),max(?,min(max(?,?),?))),min(max(?,min(?,?)),max(min(max(?,?),?),min(?,?)))),max(min(max(?,min(?,?)),max(min(?,max(?,?)),min(?,?))),min(max(?,min(max(?,?),max(?,?))),max(min(?,?),min(?,?))))),min(max(min(max(?,min(?,?)),...

output:

998497

result:

ok single line: '998497'

Test #105:

score: 0
Accepted
time: 187ms
memory: 242692kb

input:

min(?,min(?,min(min(max(max(min(?,?),max(?,?)),max(max(?,max(?,max(?,?))),min(min(?,max(min(?,?),min(?,?))),min(max(max(min(min(min(?,?),?),?),min(max(?,?),max(min(?,max(max(?,?),min(?,max(min(?,min(min(min(min(?,?),?),min(?,?)),max(min(max(min(min(?,max(?,max(?,?))),min(max(min(?,min(?,?)),max(max(...

output:

999993

result:

ok single line: '999993'

Test #106:

score: 0
Accepted
time: 191ms
memory: 242304kb

input:

max(min(?,max(?,max(?,?))),min(?,max(max(max(min(?,?),?),min(?,?)),max(max(max(?,?),max(max(max(?,?),min(min(min(min(min(?,?),?),min(?,?)),max(max(max(?,?),?),max(min(min(?,?),min(max(?,?),?)),max(min(min(min(min(?,min(?,?)),?),min(max(?,?),max(max(max(?,min(?,max(?,?))),max(min(?,?),max(?,max(max(m...

output:

999998

result:

ok single line: '999998'

Test #107:

score: 0
Accepted
time: 189ms
memory: 242288kb

input:

min(?,max(?,min(min(min(min(max(?,min(max(?,min(min(min(?,min(?,?)),?),min(min(?,min(min(min(min(?,?),max(?,?)),min(min(min(?,min(?,min(?,min(max(min(?,?),min(?,min(?,?))),max(min(?,min(min(?,min(?,min(min(max(?,?),min(min(min(min(min(?,?),min(?,?)),min(min(?,min(min(min(min(max(?,?),?),?),min(min(m...

output:

999999

result:

ok single line: '999999'

Test #108:

score: 0
Accepted
time: 186ms
memory: 242200kb

input:

max(max(max(?,?),max(?,max(?,max(max(max(max(max(max(max(?,?),?),?),max(max(max(max(max(max(?,max(?,?)),max(?,?)),max(max(min(max(max(?,max(?,?)),?),max(?,max(max(min(max(?,?),?),max(?,?)),max(max(?,max(max(max(?,?),?),?)),max(max(max(max(max(?,max(?,?)),?),max(max(max(max(?,?),max(max(min(max(?,?),...

output:

999957

result:

ok single line: '999957'

Test #109:

score: 0
Accepted
time: 173ms
memory: 242532kb

input:

max(min(?,?),min(max(?,min(?,?)),max(min(?,?),min(max(min(max(min(?,?),?),max(min(max(?,?),?),min(max(min(max(min(max(?,?),?),min(?,?)),max(min(?,?),min(max(min(max(?,min(?,?)),max(?,min(max(min(max(min(?,max(?,?)),?),?),min(max(min(max(min(max(min(?,?),min(?,max(?,?))),max(min(max(?,?),max(?,min(ma...

output:

999997

result:

ok single line: '999997'

Test #110:

score: 0
Accepted
time: 195ms
memory: 179928kb

input:

min(max(max(min(max(min(min(max(max(min(max(min(max(?,max(?,?)),max(max(min(min(min(max(?,?),max(?,max(?,?))),max(?,?)),max(max(min(max(?,?),?),min(?,?)),?)),max(max(max(?,?),max(max(min(?,?),max(max(?,?),max(?,?))),min(?,?))),min(min(?,min(min(?,?),?)),?))),max(max(max(min(?,?),?),min(?,max(?,?))),...

output:

999968

result:

ok single line: '999968'

Test #111:

score: 0
Accepted
time: 196ms
memory: 179996kb

input:

max(max(max(max(min(min(min(max(max(max(min(max(min(max(?,?),max(max(?,?),min(?,?))),?),min(max(min(max(min(max(min(max(min(?,min(?,?)),?),max(?,max(?,max(?,?)))),min(max(?,?),?)),max(?,?)),min(?,max(?,?))),min(max(max(min(max(min(min(min(?,min(?,?)),min(?,max(?,?))),?),max(max(max(?,?),?),min(?,?))...

output:

999907

result:

ok single line: '999907'

Test #112:

score: 0
Accepted
time: 200ms
memory: 179648kb

input:

max(min(min(min(min(max(min(min(min(min(min(min(min(min(?,min(max(?,?),?)),min(?,min(?,?))),?),min(?,?)),min(min(min(?,min(min(?,?),min(min(min(?,?),min(?,?)),?))),?),min(min(?,?),min(?,?)))),min(min(min(min(min(min(min(?,min(min(min(?,?),min(?,?)),?)),min(?,?)),max(?,?)),max(min(?,min(?,min(min(?,?...

output:

997477

result:

ok single line: '997477'

Test #113:

score: 0
Accepted
time: 209ms
memory: 180492kb

input:

max(max(max(max(max(max(max(max(max(max(max(max(max(max(max(?,?),max(max(max(max(max(max(max(max(max(?,?),max(max(min(?,?),?),max(max(max(?,?),?),?))),max(min(?,?),max(?,max(?,?)))),max(min(?,min(max(?,max(?,max(max(?,?),max(max(?,?),?)))),max(?,max(?,?)))),max(max(max(max(?,?),max(max(?,?),max(max(...

output:

892729

result:

ok single line: '892729'

Test #114:

score: 0
Accepted
time: 196ms
memory: 180100kb

input:

max(min(max(min(max(min(max(min(max(min(max(min(max(min(max(min(max(?,?),max(?,?)),min(max(?,min(?,max(?,?))),?)),max(min(max(?,min(max(?,?),max(?,?))),?),?)),min(max(min(max(?,?),?),min(?,max(?,min(?,?)))),max(min(max(min(?,?),min(max(?,?),?)),max(?,?)),?))),max(min(max(min(?,max(min(?,?),min(?,max...

output:

999903

result:

ok single line: '999903'

Test #115:

score: 0
Accepted
time: 199ms
memory: 377400kb

input:

max(max(max(?,max(?,min(max(min(min(min(min(?,max(max(min(?,min(?,max(?,min(min(max(?,max(min(?,max(max(?,min(?,min(?,min(min(min(min(?,max(?,min(min(max(min(?,max(?,max(?,min(min(?,max(?,max(?,min(max(?,min(min(?,max(max(max(max(?,max(?,max(?,min(?,max(?,min(min(min(?,max(max(?,max(max(?,max(?,max(...

output:

999996

result:

ok single line: '999996'

Test #116:

score: 0
Accepted
time: 212ms
memory: 377232kb

input:

max(max(?,min(min(min(?,max(max(max(?,max(?,max(max(?,max(max(min(max(max(?,min(max(max(?,max(max(?,min(?,min(?,max(?,min(?,min(?,min(?,min(?,max(min(?,min(?,max(?,min(max(?,min(min(?,min(min(?,min(max(max(?,max(?,max(?,min(min(?,max(max(?,min(min(min(?,max(?,max(?,max(min(?,max(min(?,min(?,min(max(...

output:

999998

result:

ok single line: '999998'

Test #117:

score: 0
Accepted
time: 195ms
memory: 377260kb

input:

min(min(min(?,min(?,min(min(min(?,min(min(min(min(?,min(?,max(?,min(min(min(min(?,min(min(min(min(?,min(?,min(?,min(min(min(?,min(?,min(?,min(?,min(max(?,min(?,min(?,max(min(min(min(min(min(min(?,min(min(min(?,min(?,max(?,min(?,min(?,min(min(?,min(min(?,min(?,max(?,min(min(min(?,min(?,min(?,min(?,ma...

output:

999988

result:

ok single line: '999988'

Test #118:

score: 0
Accepted
time: 213ms
memory: 378016kb

input:

max(max(?,max(max(max(?,max(?,max(?,max(?,max(max(?,max(?,max(max(?,max(max(max(?,max(?,max(max(max(?,max(?,max(min(?,max(max(?,max(?,max(?,max(?,max(min(?,max(?,max(?,max(?,max(max(?,max(?,max(?,max(?,max(max(max(min(max(max(?,max(?,min(?,max(?,max(?,max(max(?,max(?,max(?,max(max(max(max(max(max(ma...

output:

999978

result:

ok single line: '999978'

Test #119:

score: 0
Accepted
time: 190ms
memory: 377120kb

input:

min(?,max(min(max(min(max(min(max(min(max(?,min(max(min(max(?,min(max(min(?,max(min(?,max(?,min(?,max(min(max(?,min(max(?,min(?,max(?,min(?,max(min(?,max(?,min(?,max(?,min(?,max(?,min(max(min(max(min(max(min(max(min(max(?,min(max(?,min(?,max(?,min(max(min(max(min(max(min(max(?,min(?,max(?,min(?,max(...

output:

999999

result:

ok single line: '999999'

Test #120:

score: 0
Accepted
time: 188ms
memory: 179940kb

input:

min(min(min(min(min(min(min(min(min(min(min(min(min(min(min(min(?,min(?,min(min(?,min(?,?)),min(?,?)))),min(?,min(min(?,?),min(?,?)))),min(min(min(min(?,?),min(min(?,?),?)),?),min(?,?))),min(min(min(min(min(min(min(min(?,?),min(min(min(?,?),?),?)),min(?,?)),min(?,?)),min(?,min(min(?,?),min(?,?)))),m...

output:

1

result:

ok single line: '1'

Test #121:

score: 0
Accepted
time: 196ms
memory: 179904kb

input:

max(max(max(max(max(max(max(max(max(max(max(max(max(max(max(max(?,?),?),max(max(max(?,?),max(?,?)),?)),?),max(max(?,max(?,max(?,?))),max(?,max(?,max(?,?))))),max(max(max(?,max(max(?,?),max(max(max(?,?),?),max(?,max(max(?,?),?))))),max(?,max(?,?))),?)),max(max(max(max(max(max(max(max(max(?,?),?),?),m...

output:

1

result:

ok single line: '1'

Test #122:

score: 0
Accepted
time: 193ms
memory: 179960kb

input:

max(min(min(max(max(max(max(max(min(min(max(min(max(min(?,?),?),min(max(max(min(max(max(?,min(?,?)),min(min(min(?,min(?,?)),max(?,?)),min(?,min(max(max(?,?),min(?,?)),max(min(?,?),min(max(?,?),?)))))),min(min(min(min(?,?),min(min(max(max(?,?),max(min(max(?,?),?),max(min(max(?,max(?,?)),?),min(min(mi...

output:

999924

result:

ok single line: '999924'

Test #123:

score: 0
Accepted
time: 182ms
memory: 180052kb

input:

max(min(max(max(min(min(max(min(min(min(max(min(min(min(min(?,?),?),min(min(max(?,?),min(max(max(?,?),max(?,?)),min(?,?))),max(min(min(?,?),max(?,?)),max(?,max(?,max(?,max(?,?))))))),max(max(max(min(min(min(?,min(max(min(max(?,?),?),max(?,?)),min(max(?,?),?))),?),max(max(?,min(?,?)),min(?,?))),?),mi...

output:

999954

result:

ok single line: '999954'

Test #124:

score: 0
Accepted
time: 187ms
memory: 269980kb

input:

min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,...

output:

999999

result:

ok single line: '999999'

Test #125:

score: 0
Accepted
time: 199ms
memory: 270064kb

input:

max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,...

output:

999999

result:

ok single line: '999999'

Test #126:

score: 0
Accepted
time: 197ms
memory: 270064kb

input:

max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,...

output:

999999

result:

ok single line: '999999'

Test #127:

score: 0
Accepted
time: 184ms
memory: 270040kb

input:

min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,min(?,max(?,...

output:

999999

result:

ok single line: '999999'

Test #128:

score: 0
Accepted
time: 77ms
memory: 94952kb

input:

min(max(max(max(min(max(max(max(max(min(max(max(max(max(max(min(max(max(max(?,?),min(?,?)),min(max(?,?),min(?,?))),max(max(min(?,?),min(?,?)),min(min(?,?),min(?,?)))),max(min(min(min(?,?),min(?,?)),max(max(?,?),min(?,?))),min(max(min(?,?),max(?,?)),min(max(?,?),min(?,?))))),min(min(min(min(min(?,?),...

output:

524234

result:

ok single line: '524234'

Test #129:

score: 0
Accepted
time: 71ms
memory: 94708kb

input:

min(max(min(min(min(min(min(max(min(min(min(min(min(min(min(min(min(min(min(?,?),min(?,?)),max(min(?,?),min(?,?))),min(max(min(?,?),min(?,?)),min(min(?,?),min(?,?)))),min(min(min(min(?,?),min(?,?)),min(min(?,?),min(?,?))),min(min(min(?,?),min(?,?)),max(min(?,?),min(?,?))))),min(min(min(min(min(?,?),...

output:

385768

result:

ok single line: '385768'

Test #130:

score: 0
Accepted
time: 73ms
memory: 94600kb

input:

min(max(min(max(min(max(min(max(min(max(min(max(min(max(min(max(min(max(min(?,?),min(?,?)),max(min(?,?),min(?,?))),min(max(min(?,?),min(?,?)),max(min(?,?),min(?,?)))),max(min(max(min(?,?),min(?,?)),max(min(?,?),min(?,?))),min(max(min(?,?),min(?,?)),max(min(?,?),min(?,?))))),min(max(min(max(min(?,?),...

output:

522754

result:

ok single line: '522754'

Test #131:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

max(?,?)

output:

1

result:

ok single line: '1'

Extra Test:

score: 0
Extra Test Passed