The 3n + 1 problem  Background Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is…
, '\n'); #include<cstdio> #include<iostream> #include<string> #include<algorithm> #include<iterator> #include<cstring> //uva 10033 Problem G: Interpreter #define ONLINE_JUDGE using namespace std; ]; ]; int steps; ; int…
#include<cstdio> #include<iostream> #include<string> #include<algorithm> #include<iterator> #include<cstring> #include<set> using namespace std; int m; int n; //bmp[y][x] char bmp[251][251]; void swap_if_bigger(in…
#include <string> #include <iostream> #include <cstring> #include <algorithm> using namespace std; string numbers[5][10]={ " - ", "   ", " - ", " - ", "   ", " - ", "…
// The 3n+1 problem (3n+1 问题) // PC/UVa IDs: 110101/100, Popularity: A, Success rate: low Level: 1 // Verdict: Accepted // Submission Date: 2011-05-22 // UVa Run Time: 0.032s // // 版权所有(C)2011,邱秋.metaphysis # yeah dot net. // // [问题描述] // 考虑如下的序列生成算法…
3n+1问题 PC/UVa IDs: 110101/100 Popularity: A Success rate: low Level: 1 测试地址: https://vjudge.net/problem/UVA-100 [问题描述] 考虑如下的序列生成算法:从整数 n 开始,如果 n 是偶数,把它除以 2:如果 n 是奇数,把它乘 3 加1.用新得到的值重复上述步骤,直到 n = 1 时停止.例如,n = 22 时该算法生成的序列是: 22,11,34,17,52,26,13,40,20,1…
题目来源:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3&page=show_problem&problem=36  The 3n + 1 problem  Background Problems in Computer Science are often classified as belonging to a certain class of problem…
100 - The 3n+1 problem (3n+1 问题) /* * 100 - The 3n+1 problem (3n+1 问题) * 作者 仪冰 * QQ 974817955 * * [问题描述] * 考虑如下的序列生成算法:从整数 n 开始,如果 n 是偶数,把它除以 2:如果 n 是奇数, * 把它乘 3 加1.用新得到的值重复上述步骤,直到 n = 1 时停止. * 例如,n = 22 时该算法生成的序列是: * 22,11,34,17,52,26,13,40,20,10,5,…
The 3n + 1 problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22148    Accepted Submission(s): 8276 Problem Description Problems in Computer Science are often classified as belonging to a c…
Problem A: The 3n + 1 problem Time Limit: 1 Sec  Memory Limit: 64 MBSubmit: 14  Solved: 6[Submit][Status][Web Board] Description Consider the following algorithm to generate a sequence of numbers. Start with an integer n. If n is even, divide by 2. I…