Search found 2 matches

by the_mez
Wed Jun 08, 2016 8:07 pm
Forum: Volume 4 (400-499)
Topic: 490 - Rotating Sentences
Replies: 212
Views: 21787

Re: 490 - Rotating Sentences

gettting runtime error in uva-490 help me out #include<iostream> using namespace std; int main() { string lines[100]; int i=0,max_len=0; int x; while(getline(cin,lines )) { if (lines =="") continue; x=lines .length(); if (x>max_len) max_len=x; i++; } //cout<<max_len; int m; for(m=0;m<max_len;m++) { ...
by the_mez
Sun Jun 05, 2016 4:41 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 32382

Re: 495 - Fibonacci Freeze

i am getting TLE in uva-495..any help? #include<iostream> #include<string> using namespace std; string rev(string tmp) { char x; for(int i=0,j=tmp.length()-1;i<j;i++,j--) { x=tmp ; tmp =tmp[j]; tmp[j]=x; } return tmp; } string add(string small,string large) { int smlen=small.length()-1; int lrglen=l...

Go to advanced search