
Search found 2 matches
- Thu Dec 11, 2003 4:27 am
- Forum: Volume 2 (200-299)
- Topic: 271 - Simply Syntax
- Replies: 46
- Views: 19869
- Sun Nov 30, 2003 11:25 am
- Forum: Volume 2 (200-299)
- Topic: 271 - Simply Syntax
- Replies: 46
- Views: 19869
271 WA
I got WA.
Anyone tell me why, please?
#include<iostream>
#include<stack>
#include<string>
using namespace std;
int main()
{
string t;
while(cin>>t){
stack<char> s;
int q=0;
for(int i=0;i<t.size();i++){
if(t[i]<'a')
s.push(t[i]);
else{
q++;
}
while(q>1){
if(s.empty()){
i=t.size ...
Anyone tell me why, please?
#include<iostream>
#include<stack>
#include<string>
using namespace std;
int main()
{
string t;
while(cin>>t){
stack<char> s;
int q=0;
for(int i=0;i<t.size();i++){
if(t[i]<'a')
s.push(t[i]);
else{
q++;
}
while(q>1){
if(s.empty()){
i=t.size ...