Search found 5 matches

by law1009
Sun Aug 27, 2006 2:51 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 57097

I do not understand why you write this:
char k=1;

it should be like this:
int k=1;

modify it and you'll get ACC. I have already tried it and the program got ACC immediately !! :D Good Luck !!


Thank you very much! it could be accepted.

and may i have another question?
"Warning: Your ...
by law1009
Fri Aug 25, 2006 1:42 pm
Forum: Volume 2 (200-299)
Topic: 272 - TEX Quotes
Replies: 136
Views: 57097

WA in 272

excuse me! i do not know where is the bug.
please give me some tips. thanks a lot.


#include <iostream>
using namespace std;
int main(){

char str[2000];
char k=1;
while(cin){
cin.getline(str, 2000);
for(int i=0; str[i]!= '\0' ; i++){

if(str[i]=='"'){
if(k%2==1) cout<<"``";
else cout ...
by law1009
Fri Aug 25, 2006 10:44 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 320785

execuse me! where's my bug?

[situation]
It could run well in Dev C++, but could't pass the demo of acm.
I already tried my best to find the bug but in vain.
Thanks for helping!


#include <iostream>

using namespace std;

int main(){
int i=0;
int j=0;


while(cin>>i>>j){
int count;
int val=0;
if(i>j){
int tmp;
tmp ...
by law1009
Fri Aug 25, 2006 10:32 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 320785

i am sorry.
i did't notice that thread.
i'll be careful at next time. thank for your advice.
by law1009
Fri Aug 25, 2006 4:24 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 320785

WA in 100 (C++)

Excuse me!My code could run correctly in Dev c++, but can't be accepted by acm.
The message:"Your program has not solved the problem. It ran during 5.092 seconds."
What's wrong with it? Thanks. :D


#include <iostream>

using namespace std;

int main(){
int i=0;
int j=0;


while(cin>>i>>j ...

Go to advanced search