Submission #904922
Source Code Expand
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <algorithm> #include <vector> #include <utility> #include <queue> #include <deque> #include <stack> #include <set> #include <map> using namespace std ; typedef long long ll ; int main() { char c ; int ans = 0 ; int s = 0, t = 0 ; int tot = 0 ; while(c = getchar()) { if(c == 'S') { s++ ; tot++ ; } else if(c == 'T') { t++ ; tot++ ; if(s) { s-- ; t-- ; ans++ ; } } else { return printf("%d\n", tot-2*ans)*0 ; } } return 0 ; }
Submission Info
Submission Time | |
---|---|
Task | A - STring |
User | nmmlitswe |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 780 Byte |
Status | AC |
Exec Time | 4 ms |
Memory | 128 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 | 3 ms | 128 KB |
corner1 | AC | 3 ms | 128 KB |
corner2 | AC | 3 ms | 128 KB |
example0 | AC | 1 ms | 128 KB |
example1 | AC | 1 ms | 128 KB |
example2 | AC | 1 ms | 128 KB |
handmade0 | AC | 1 ms | 128 KB |
handmade1 | AC | 1 ms | 128 KB |
maxrand0 | AC | 4 ms | 128 KB |
sub_corner0 | AC | 1 ms | 128 KB |
sub_corner1 | AC | 1 ms | 128 KB |
sub_corner2 | AC | 1 ms | 128 KB |
sub_rand0 | AC | 1 ms | 128 KB |