摘要:
#include using namespace std; long long a[51]; int main() { int n; a[1] = 3; a[2] = 6; a[3] = 6; for (int i = 4; i > n) { cout << a[n] << endl; } } 阅读全文
摘要:
#include using namespace std; long long fib(int n) { long long f0 = 1; long long f1 = 1; if (n = 2) { long long f2 = f0 + f1; f0 = f1; f1 = f2; n--; ... 阅读全文
摘要:
#include #include using namespace std; vector yueShu(long a) { vector vec; vec.push_back(1); for (int i = 2; i v) { long s = 0; for (int vi : v) { s += vi; } ... 阅读全文
摘要:
#include using namespace std; struct Time { int start; int end; }; Time times[101]; int dp[101]; void sortTimes(Time times[], int n) { // 直接插入排序 for (int i = 1; i = 1 && times[j].... 阅读全文
摘要:
#include using namespace std; struct Point { int x, y; }; Point a[101]; int main() { int n; while (cin >> n && n != 0) { for (int i = 1; i > a[i].x >> a[i].y; } ... 阅读全文
摘要:
#include using namespace std; int main() { long a, b; while (cin >> a >> b && a != 0 && b != 0) { long result = a; for (long i = 2; i <= b; i++) { ... 阅读全文
摘要:
#include #include using namespace std; int main() { int n; int h, m, s; int AH, AM, AS, BH, BM, BS; int flag = 0; cin >> n; while (n--) { cin >> AH >> AM >... 阅读全文
摘要:
#include #include using namespace std; int main() { int n; int a[31][31]; for (int i = 1; i > n) { for (int i = 1; i <= n; i++) { for (int j = 1; j < i;... 阅读全文
摘要:
#include #include using namespace std; int main() { int N,R; string a("0123456789ABCDEFG"); while (cin >> N >> R) { string s=""; bool flag = true; if (N 0) ... 阅读全文
摘要:
#include #include using namespace std; bool isPalindromes(string s) { int len = s.size(); int l = 0, r = len - 1; while (l > n) { string s; for (int i = 1; i > s; ... 阅读全文
摘要:
#include using namespace std; int main() { int n, i; int a[100]; while (cin >> n) { int max; cin >> a[0]; max = a[0]; for (i = 1; i> a[i]; ... 阅读全文
摘要:
#include #include #include using namespace std; int main() { int n; cin >> n; string t; getline(cin, t); while (n >= 1) { string s; int a = 0, e = 0, i = ... 阅读全文
摘要:
#include #include #include double a[51][6],b[51],c[6]; using namespace std; int main() { int n, m; int count = 0; while (cin >> n >> m) { count = 0; for (i... 阅读全文
摘要:
#include #include using namespace std; int main() { int m, n; int x, y; long Max = 0; int score; while (cin >> m >> n) { for (int i = 1; i > score; ... 阅读全文
摘要:
A,B,C三个人是好朋友,每个人手里都有一些糖果,我们不知道他们每个人手上具体有多少个糖果,但是我们知道以下的信息:A - B, B - C, A + B, B + C. 这四个数值.每个字母代表每个人所拥有的糖果数.现在需要通过这四个数值计算出每个人手里有多少个糖果,即A,B,C。这里保证最多只有 阅读全文
摘要:
```` import java.util.ArrayList; import java.util.Scanner; public class qq001 { public static void main(String[] args) { // TODO Auto generated method 阅读全文