oh ! thank you !!
but i got RE .
thanks again.
who can help me find bug in my code .
thank you.
Search found 4 matches
- Sun Aug 13, 2006 11:52 am
- Forum: Volume 6 (600-699)
- Topic: 673 - Parentheses Balance
- Replies: 243
- Views: 79453
- Sun Aug 13, 2006 9:38 am
- Forum: Volume 6 (600-699)
- Topic: 673 - Parentheses Balance
- Replies: 243
- Views: 79453
673 , RE why??
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <stack>
using namespace std;
stack<char> x;
bool judge(char *in)
{
static int i,len;
while(!x.empty()) x.pop();
len=strlen(in);
if(in[0] == ']' || in[0] == ')') return 0;
if(len % 2 != 0) return 0;
for ...
- Sat Aug 05, 2006 8:20 am
- Forum: Volume 4 (400-499)
- Topic: 483 - Word Scramble
- Replies: 122
- Views: 38929
thx
thank you.
i got AC bot PE.
that's ok.
i got AC bot PE.
that's ok.
- Fri Aug 04, 2006 11:32 am
- Forum: Volume 4 (400-499)
- Topic: 483 - Word Scramble
- Replies: 122
- Views: 38929
483 why WA , plz help me !!
#include <iostream>
#include <stack>
#include <string>
using namespace std;
int main()
{
int i,len;
string str;
stack<char> x;
while(getline(cin,str)){
if(cin.eof()) break;
for(i=0; i <= str.length(); ++i){
if(str[i] == ' ' || str[i] == '\0'){
while(!x.empty()){
cout << x.top() ;
x.pop ...
#include <stack>
#include <string>
using namespace std;
int main()
{
int i,len;
string str;
stack<char> x;
while(getline(cin,str)){
if(cin.eof()) break;
for(i=0; i <= str.length(); ++i){
if(str[i] == ' ' || str[i] == '\0'){
while(!x.empty()){
cout << x.top() ;
x.pop ...