Topic Connection: Click to open link
Problem Solving Ideas:
Simulation
Full code:
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <set >using namespace Std;const int INF = 1000000000;const int maxn = 10001; Char A[MAXN], b[maxn];void mystrcat (char dststr[], char srcstr[]) { char c[maxn]; int cnt = 0; for (int i = 0; dststr[i]; i + +) c[cnt++] = dststr[i]; for (int i = 0; srcstr[i]; i + +) c[cnt++] = srcstr[i]; c[cnt++] = ' + '; for (int i = 0; c[i]; i + +) printf ("%c", C[i]); cout << Endl;} int main () { #ifdef doubleq freopen ("In.txt", "R", stdin); #endif//Doubleq while (Cin >> a >> b) { Mystrcat (A, b);} }
Topic Connection: Click to open link
Problem Solving Ideas:
This problem can add difficulty, and feel test instructions expression problem, strangers to the rich talk about the plan, the first tone should be a stranger said .... But in the end is a rich tone to solve the problem.
Full code:
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <set >using namespace Std;const int INF = 1000000000;const int maxn = 10001; int main () { long long sum = 1; A long long k = 1; for (int i = 2; I <=; i + +) { k = k * 2; sum + = k; } cout << "$" << sum << Endl;}
Topic Connection: Click to open link
Problem Solving Ideas:
This problem let me understand the nine degree above to use the loop to determine whether to enter the end to terminate!!!
Full code:
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <set >using namespace Std;const int INF = 1000000000;const int maxn = 10001; Long Long a[4][4], B[4][4];long long C[4][4];int main () {#ifdef Doubleq freopen ("In.txt", "R", stdin); #endif//Doubleq while (CIN >> a[0][0]) {cin >> a[0][1] >> a[0][2] >> a[1][0] & Gt;> a[1][1] >> a[1][2]; for (int i = 0; i < 3; i + +) {for (int j = 0; J < 2; J + +) {cin > > B[i][j]; }} for (int i = 0; i < 2; i + +) {for (int j = 0; J < 2; J + +) { A long long sum = 0; for (int k = 0; k < 3; k + +) {sum + = a[i][k] * B[k][j]; } c[i][j] = sum; }} for (int i = 0; i < 2; i + +) { for (int j = 0; J < 2; J + +) {cout << c[i][j] << ""; } cout << Endl; } }}
2012 the computer Research of Harbin Institute of Technology The real problem