Search found 3 matches

by vacho
Fri Nov 04, 2005 10:11 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 317910

Ok I changed the output then what is the problem now?I get WA

here:

#include <iostream>
#include <vector>
using namespace std;

int main(){
unsigned int n=0,m=0;
int max=0;
vector<unsigned int> vec;

while(cin >> n >> m) {
if(n>m){
unsigned int temp=n;
n=m;
m=temp;
}
vec.push_back(n ...
by vacho
Fri Nov 04, 2005 7:23 am
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 317910

Thanks:)
by vacho
Thu Nov 03, 2005 9:46 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 317910

3+1 Restricted Function

When I submit the code I get reply - resticted function:( Can anyone tell me what does it mean?

here is the code

#include<fstream>

using namespace std;

int main(){
unsigned int n=0,m=0;

ifstream input("input.txt");
ofstream output("output.txt");


while(input >> n >> m ){
if(n>m ...

Go to advanced search