Submission #3451465
Source Code Expand
X = list(input()) ans = 0 c = 0 for i in range(len(X)): if X[i] == "S": c -= 1 else: c += 1 if c >= ans: ans = c print(ans * 2)
Submission Info
Submission Time | |
---|---|
Task | A - STring |
User | su_565fx |
Language | Python (3.4.3) |
Score | 300 |
Code Size | 152 Byte |
Status | AC |
Exec Time | 66 ms |
Memory | 4840 KB |
Judge Result
Set Name | Sample | Subtask1 | All | ||||||
---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | 100 / 100 | ||||||
Status |
|
|
|
Set Name | Test Cases |
---|---|
Sample | example0, example1, example2 |
Subtask1 | example0, example1, example2, sub_corner0, sub_corner1, sub_corner2, sub_rand0, handmade0, handmade1 |
All | corner0, corner1, corner2, example0, example1, example2, handmade0, handmade1, maxrand0, sub_corner0, sub_corner1, sub_corner2, sub_rand0 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
corner0 | AC | 64 ms | 4840 KB |
corner1 | AC | 65 ms | 4840 KB |
corner2 | AC | 66 ms | 4840 KB |
example0 | AC | 17 ms | 2940 KB |
example1 | AC | 17 ms | 2940 KB |
example2 | AC | 17 ms | 2940 KB |
handmade0 | AC | 17 ms | 2940 KB |
handmade1 | AC | 18 ms | 2940 KB |
maxrand0 | AC | 59 ms | 4840 KB |
sub_corner0 | AC | 17 ms | 2940 KB |
sub_corner1 | AC | 17 ms | 2936 KB |
sub_corner2 | AC | 16 ms | 2940 KB |
sub_rand0 | AC | 17 ms | 2940 KB |