Submission #904472
Source Code Expand
#include<bits/stdc++.h> using namespace std; int main(){ int i,j,k=-1; string s,b;cin>>s; while(k!=s.size()&&s.size()!=0){ b=s;k=b.size();s=""; for(i=0;i<b.size()-1;i++) { if(b[i]=='S'&&b[i+1]=='T') b[i]=b[i+1]=' '; } for(i=0;i<b.size();i++) if(b[i]!=' ') s+=b[i]; } cout << s.size() << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - STring |
User | beet |
Language | C++14 (GCC 5.4.1) |
Score | 200 |
Code Size | 354 Byte |
Status | TLE |
Exec Time | 1054 ms |
Memory | 964 KB |
Judge Result
Set Name | Sample | Subtask1 | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 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 | TLE | 1054 ms | 896 KB |
corner1 | AC | 12 ms | 836 KB |
corner2 | AC | 17 ms | 964 KB |
example0 | AC | 2 ms | 256 KB |
example1 | AC | 3 ms | 256 KB |
example2 | AC | 3 ms | 256 KB |
handmade0 | AC | 3 ms | 256 KB |
handmade1 | AC | 3 ms | 256 KB |
maxrand0 | AC | 18 ms | 644 KB |
sub_corner0 | AC | 3 ms | 256 KB |
sub_corner1 | AC | 3 ms | 256 KB |
sub_corner2 | AC | 3 ms | 256 KB |
sub_rand0 | AC | 3 ms | 256 KB |