Submission #1475112
Source Code Expand
#include<iostream> using namespace std; int main(){ string x; cin>>x; int j=0; int mas=0; for(int i=0;i<x.size()-1;i++){ if(x[i]=='S'&&x[i+1]=='T'){ mas++; for(j=1;j<i+1;j++){ if(x[i-j]=='S'&&x[i+1+j]=='T'){ mas++; }else{ j=0; i+=j; break; } } } } if(mas*2>100000){ cout<<x.size()-100000<<endl; }else{ cout<<x.size()-(mas*2)<<endl; } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - STring |
User | shichinomiya |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 494 Byte |
Status | WA |
Exec Time | 9 ms |
Memory | 640 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 | 8 ms | 640 KB |
corner1 | AC | 8 ms | 640 KB |
corner2 | WA | 8 ms | 640 KB |
example0 | AC | 1 ms | 256 KB |
example1 | AC | 1 ms | 256 KB |
example2 | AC | 1 ms | 256 KB |
handmade0 | AC | 1 ms | 256 KB |
handmade1 | AC | 1 ms | 256 KB |
maxrand0 | WA | 9 ms | 640 KB |
sub_corner0 | WA | 1 ms | 256 KB |
sub_corner1 | AC | 1 ms | 256 KB |
sub_corner2 | WA | 1 ms | 256 KB |
sub_rand0 | WA | 1 ms | 256 KB |