#include<stdio.h>#defineROW4#defineCOL4intfindnum(int a[ROW][COL],int x,int y,int f){int i =0, j = y -1;//从右上角开始遍历while(j >=0&& i < x){if(a[i][j]< f)//比我大就向下{
i++;}elseif(a[i][j]> f)//比我小就向左{
j--;}else{return1;}}return0;}intmain(){int a[ROW][COL]={{1,2,8,9},{2,4,9,12},{4,7,10,13},{6,8,11,15}};//一个示例int k =0;scanf("%d",&k);//输入要查找的数字if(findnum(a, ROW, COL, k)){printf("It has been found!\n");}else{printf("It hasn't been found!\n");}return0;}
我们使用heiken ashi smoothed来做敏感指标(大趋势借助其转向趋势预判,但不是马上转变),has默认使用6根k线的移动平均值来做计算的。若在6根k线规范内有一个突变的行情(k线很长),那么整个行情的…
1 十进制展开数
十进制展开数(Decimal Expansion Number)的计算公式:
DEN n^3 - n - 1 The decimal expansion of a number is its representation in base -10 (i.e., in the decimal system). In this system, each "decimal place…
CSP-202012-1-期末预测之安全指数
题目很简单,直接上代码
#include <iostream>
using namespace std;
int main() {int n, sum 0;cin >> n;for (int i 0; i < n; i){int w, score;cin >> w >> score;sum w * score;}if (sum > 0…