Mine got a P.E...I don't know why...plz help me~~~
#include <iostream>
#include <string>
using namespace std;
int main(){
string str;
int n;
int p;
int l;
int lasttwo;
int beforetwo;
int odd;
int even;
int sum;
int last;
int i;
while (cin>>str){
n=0;
p=0;
sum=0;
lasttwo=0 ...
Search found 5 matches
- Wed Dec 13, 2006 11:46 am
- Forum: Volume 100 (10000-10099)
- Topic: 10070 - Leap Year or Not Leap Year and ...
- Replies: 233
- Views: 84366
- Tue Dec 12, 2006 3:11 pm
- Forum: Volume 4 (400-499)
- Topic: 445 - Marvelous Mazes
- Replies: 93
- Views: 22086
445 Output limit exceeded...Plz help!!!!!
I got this strange error...output limit exceeded...Plz help me~~~
#include <iostream>
#include <string>
using namespace std;
int main(){
char ch;
string str;
int sum;
char letter;
bool b;
int i,j;
while (!cin.eof()){
b=true;
while (cin.get(ch)){
str+=ch;
if (ch=='\n' && b){
b=false ...
#include <iostream>
#include <string>
using namespace std;
int main(){
char ch;
string str;
int sum;
char letter;
bool b;
int i,j;
while (!cin.eof()){
b=true;
while (cin.get(ch)){
str+=ch;
if (ch=='\n' && b){
b=false ...
- Tue Dec 12, 2006 2:22 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10070 - Leap Year or Not Leap Year and ...
- Replies: 233
- Views: 84366
10070 P.E...strange problem...plz help!!!
I don't know why I got P.E...
#include <iostream>
#include <string>
using namespace std;
int main(){
string str;
int n;
int p;
int l;
int lasttwo;
int beforetwo;
int odd;
int even;
int sum;
int last;
int i;
while (cin>>str){
n=0;
p=0;
sum=0;
lasttwo=0;
beforetwo=0;
last=0 ...
#include <iostream>
#include <string>
using namespace std;
int main(){
string str;
int n;
int p;
int l;
int lasttwo;
int beforetwo;
int odd;
int even;
int sum;
int last;
int i;
while (cin>>str){
n=0;
p=0;
sum=0;
lasttwo=0;
beforetwo=0;
last=0 ...
- Fri Oct 27, 2006 4:55 am
- Forum: Volume 4 (400-499)
- Topic: 424 - Integer Inquiry
- Replies: 96
- Views: 38923
424 Got a WA...Pls help!!!!!
I got WA for 424, but I don't know what is wrong of my code, pls help...
#include <iostream>
#include <string>
using namespace std;
int main(){
string str[110];
string str2[110];
string result;
char* ch;
char p;
int i,j,k;
int maxl;
int x10,x1;
int n;
i=0;
do{
cin>>str ;
if (str [0 ...
#include <iostream>
#include <string>
using namespace std;
int main(){
string str[110];
string str2[110];
string result;
char* ch;
char p;
int i,j,k;
int maxl;
int x10,x1;
int n;
i=0;
do{
cin>>str ;
if (str [0 ...
- Mon Sep 18, 2006 4:15 pm
- Forum: Volume 5 (500-599)
- Topic: 591 - Box of Bricks
- Replies: 80
- Views: 25299
591
I really can't find any mistakes...Pls help me~~~ :cry:
#include <iostream>
using namespace std;
int main(){
int count=0;
int block;
long sum;
long result;
long diff;
int i;
do{
sum=0;
result=0;
cin>>block;
if (block==0){
break;}
count++;
int a[block];
for (i=0;i<block;i++){
cin ...
#include <iostream>
using namespace std;
int main(){
int count=0;
int block;
long sum;
long result;
long diff;
int i;
do{
sum=0;
result=0;
cin>>block;
if (block==0){
break;}
count++;
int a[block];
for (i=0;i<block;i++){
cin ...