Submission #905775
Source Code Expand
#include <iostream> #include <vector> #include <cmath> #include <string> #include <algorithm> #include <numeric> #include <climits> #define ll long long #define LIM 100000 using namespace std; ll v[LIM]; int main() { string s; cin >> s; int i = 0; int l = 0; int r = 0; int cnt = 0; while (i < s.size() - 1 && i < pow(10, 4)) { l = i; r = i + 1; while (0 <= l && r < s.size() && s[l] == 'S' && s[r] == 'T') { cnt++; l--; r++; i = r - 1; } i++; } cout << s.size() - cnt * 2 << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - STring |
User | yka |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 590 Byte |
Status | WA |
Exec Time | 9 ms |
Memory | 768 KB |
Judge Result
Set Name | Sample | Subtask1 | All | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | 0 / 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 | WA | 9 ms | 640 KB |
corner1 | WA | 9 ms | 768 KB |
corner2 | WA | 9 ms | 640 KB |
example0 | AC | 2 ms | 256 KB |
example1 | AC | 2 ms | 256 KB |
example2 | AC | 2 ms | 256 KB |
handmade0 | AC | 3 ms | 256 KB |
handmade1 | AC | 3 ms | 256 KB |
maxrand0 | WA | 9 ms | 640 KB |
sub_corner0 | WA | 3 ms | 256 KB |
sub_corner1 | AC | 3 ms | 256 KB |
sub_corner2 | WA | 3 ms | 256 KB |
sub_rand0 | WA | 2 ms | 256 KB |