【蓝桥日记⑤】2014第五届省赛(软件类)JavaA组❆答案解析

news2024/9/27 7:25:19

【蓝桥日记⑤】2014第五届省赛(软件类)JavaA组☃答案解析

文章目录

    • 【蓝桥日记⑤】2014第五届省赛(软件类)JavaA组☃答案解析
      • 1、猜年龄
      • 2、李白打酒
      • 3、神奇算式
      • 4、写日志
      • 5、锦标赛
      • 6、六角填数
      • 7、绳圈
      • 8、兰顿蚂蚁
      • 9、斐波那契
      • 10、波动数列

1、猜年龄

解法:暴力枚举

package fiveSession;

/*** 2014第五届 1、猜年龄 ***/
public class test1 {
    public static void main(String[] args) {
        int age1 = 0, age2 = 0;
        boolean find = false;
        for (int i = 1; i < 50; i++) {
            for (int j = i + 1; j < i + 9; j++) {
                if (i * j == 6 * (i + j)) {
                    age1 = i;
                    age2 = j;
                    find = true;
                    break;
                }
            }
            if (find) break;
        }
        System.out.println(age1);
    }
}

答案:10


2、李白打酒

解法:递归

package fiveSession;

/*** 2014第五届 2、李白打酒 ***/
public class test2 {
    public static void main(String[] args) {
        int wine = 2;
        int shop = 5, flower = 10;
        int res = f(wine, shop, flower);
        System.out.println(res);
    }

    private static int f(int wine, int shop, int flower) {
        if (shop < 0 || flower < 0) return 0;
        if (wine == 0 && (shop != 0 || flower != 0)) return 0;
        if (wine == 0 && shop == 0 && flower == 0) return 1;
        int res = f(wine * 2, shop - 1, flower);
        res += f(wine - 1, shop, flower - 1);
        return res;
    }
}

递归二

package fiveSession;

/*** 2014第五届 2、李白打酒 ***/
public class test2 {
    static int res = 0;
    public static void main(String[] args) {
        int wine = 2;
        int shop = 5, flower = 10 - 1;
        f(wine, shop, flower);
        System.out.println(res);
    }

    private static void f(int wine, int shop, int flower) {
        if (wine == 1 && shop == 0 && flower == 0) {
            res++;
            return;
        }
        if (shop > 0) f(wine * 2, shop - 1, flower);
        if (flower > 0) f(wine - 1, shop, flower - 1);
    }
}

答案:14


3、神奇算式

解法:暴力枚举

package fiveSession;

import java.util.Arrays;

/*** 2014第五届 3、神奇算式 ***/
public class test3 {
    public static void main(String[] args) {
        int res = 0;

        for (int i = 1; i < 10; i++) {
            for (int j = 0; j < 10; j++) {
                if (i == j) continue;
                for (int k = 0; k < 10; k++) {
                    if (i == k || j == k) continue;
                    for (int p = 0; p < 10; p++) {
                        if (i == p || j == p || k == p) continue;
                        int src = i * 1000 + j * 100 + k * 10 + p;
                        if (j != 0) {
                            res += check(src, i * (j * 100 + k * 10 + p));
                        }
                        if (k != 0 && (i * 10 + j) < (k * 10 + p)) {
                            res += check(src, (i * 10 + j) * (k * 10 + p));
                        }
                    }
                }
            }
        }

        System.out.println(res);
    }

    public static int check(int src, int r2) {
        String s1 = String.valueOf(src);
        String s2 = String.valueOf(r2);
        char[] cs1 = s1.toCharArray();
        char[] cs2 = s2.toCharArray();
        Arrays.sort(cs1);
        Arrays.sort(cs2);
        if (new String(cs1).equals(new String(cs2))) return 1;
        return 0;
    }
}

答案:12


4、写日志

解法:找规律

package fiveSession;

/*** 2014第五届 4、写日志 ***/
public class test4 {
    private static int n = 1;

    public static void write(String msg) {
        String filename = "t" + n + ".log";
        n = (n % 3) + 1;
        System.out.println(filename + "," + msg);
    }
    
    public static void main(String[] args) {
        for (int i = 0; i < 15; i++) write("a");
    }
}

答案:(n % 3) + 1


5、锦标赛

package fiveSession;

/*** 2014第五届  5、锦标赛 ***/
public class test5 {
    static void f(int[] a) {
        int n = 1;
        while (n < a.length) n *= 2;

        int[] b = new int[2 * n - 1];
        for (int i = 0; i < n; i++) {
            if (i < a.length)
                b[n - 1 + i] = i;
            else
                b[n - 1 + i] = -1;
        }

        //从最后一个向前处理
        for (int i = b.length - 1; i > 0; i -= 2) {
            if (b[i] < 0) {
                if (b[i - 1] >= 0)
                    b[(i - 1) / 2] = b[i - 1];
                else
                    b[(i - 1) / 2] = -1;
            } else {
                if (a[b[i]] > a[b[i - 1]])
                    b[(i - 1) / 2] = b[i];
                else
                    b[(i - 1) / 2] = b[i - 1];
            }
        }

        //输出树根
        System.out.println(b[0] + ":" + a[b[0]]);

        //值等于根元素的需要重新pk
        pk(a, b, 0, b[0]);

        //再次输出树根
        System.out.println(b[0] + ":" + a[b[0]]);
    }

    static void pk(int[] a, int[] b, int k, int v) {
        //if(k>b.length) return;

        int k1 = k * 2 + 1;
        int k2 = k1 + 1;

        if (k1 >= b.length || k2 >= b.length) {
            // 此处将 叶子结点为最大值的 下标b[k]抹去,置为-1 
            b[k] = -1; //(要是我我会该行代码设为考点~(@^_^@)~)
            return;
        }

        if (b[k1] == v)
            pk(a, b, k1, v);
        else
            pk(a, b, k2, v);

        //重新比较
        if (b[k1] < 0) {
            if (b[k2] >= 0)
                b[k] = b[k2];
            else
                b[k] = -1;
            return;
        }

        if (b[k2] < 0) {
            if (b[k1] >= 0)
                b[k] = b[k1];
            else
                b[k] = -1;
            return;
        }

        if (a[b[k1]]>a[b[k2]])
            b[k] = b[k1];
        else
            b[k] = b[k2];
    }

    public static void main(String[] args) {
        int[] a = {54, 55, 18, 16, 122, 255, 30, 9, 58, 66};
        f(a);
    }
}

答案:a[b[k1]]>a[b[k2]]


6、六角填数

解法:全排列+剪枝

package fiveSession;

/*** 2014第五届  6、六角填数 ***/
public class test6 {
    static int[] a = {2, 4, 5, 6, 7, 9, 10, 11, 12};
    public static void main(String[] args) {
        backtrack(0, a.length);
    }

    private static void backtrack(int begin, int end) {
        if (begin == 6 && 8 + a[0] + a[1] + a[2] != 1 + a[0] + a[3] + a[5]) return;
        if (begin == 7 && 8 + a[0] + a[1] + a[2] != 8 + a[3] + a[6] + 3) return;
        if (begin == end) {
            if (8 + a[0] + a[1] + a[2] != a[5] + a[6] + a[7] + a[8]) return;
            if (8 + a[0] + a[1] + a[2] != a[2] + a[4] + a[7] + 3) return;
            if (8 + a[0] + a[1] + a[2] != 1 + a[1] + a[4] + a[8]) return;
            System.out.println(a[3]);
        }

        for (int i = begin; i < end; i++) {
            int t = a[begin]; a[begin] = a[i]; a[i] = t;
            backtrack(begin + 1, end);
            t = a[begin]; a[begin] = a[i]; a[i] = t;
        }
    }
}

答案:10


7、绳圈

解法:动态规划

绳圈组合数:自成一圈+加入前一组合(2个头+i -1个分割点)

C[i]表示i个绳的组合数,则有
C [ i ] = c [ i − 1 ] + C [ i − 1 ] ∗ ( i − 1 ) ∗ 2 = C [ i − 1 ] ∗ ( 2 i − 1 ) C[i] = c[i -1] + C[i - 1] *(i - 1) * 2 = C[i-1]*(2i-1) C[i]=c[i1]+C[i1](i1)2=C[i1](2i1)
F[i][j]表示i个绳组j个圈的概率,则有
F [ i ] [ j ] = F [ i − 1 ] [ j − 1 ] ∗ C [ i − 1 ] + F [ i − 1 ] [ j ] ∗ C [ i − 1 ] ∗ ( i − 1 ) ∗ 2 C [ i ] F[i][j]=\frac{F[i-1][j-1]*C[i-1]+F[i-1][j]*C[i-1]*(i-1)*2}{C[i]} F[i][j]=C[i]F[i1][j1]C[i1]+F[i1][j]C[i1](i1)2
联立两式约分有
F [ i ] [ j ] = F [ i − 1 ] [ j − 1 ] + F [ i − 1 ] [ j ] ∗ ( i − 1 ) ∗ 2 2 i − 1 F[i][j]=\frac{F[i-1][j-1]+F[i-1][j]*(i-1)*2}{2i-1} F[i][j]=2i1F[i1][j1]+F[i1][j](i1)2

package fiveSession;

/*** 2014第五届  7、绳圈 ***/
public class test7 {
    public static void main(String[] args) {
        double[][] f = new double[101][101];
        f[1][1] = 1;
        for (int rope = 2; rope <= 100; rope++) {
            f[rope][1] = f[rope - 1][1] * (rope - 1) * 2 / (2 * rope - 1);
            for (int circle = 2; circle <= rope; circle++) {
                f[rope][circle] = (f[rope - 1][circle - 1] + f[rope - 1][circle] * (rope - 1) * 2) / (2 * rope - 1);
            }
        }
        int ans = 0;
        double maxVal = 0.0;
        for (int circle = 1; circle <= 100; circle++) {
            if (f[100][circle] > maxVal) {
                maxVal = f[100][circle];
                ans = circle;
            }
        }

        System.out.println(ans);
    }
}

答案:3


8、兰顿蚂蚁

解法:方向模拟

package fiveSession;

import java.util.Scanner;

/*** 2014第五届  8、兰顿蚂蚁 ***/
public class test8 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int m = sc.nextInt();
        int n = sc.nextInt();
        int[][] g = new int[m][n];
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                g[i][j] = sc.nextInt();
            }
        }

        int x = sc.nextInt();
        int y = sc.nextInt();
        String s = sc.next();
        int d = getD(s);
        int k = sc.nextInt();

        // 方向: 上右下左
        int[][] dirs = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}};
        for (int i = 1; i <= k; i++) {
            if (g[x][y] == 0) {
                d = (d + 3) % 4;
                g[x][y] = 1;
            } else {
                d = (d + 1) % 4;
                g[x][y] = 0;
            }
            x = x + dirs[d][0];
            y = y + dirs[d][1];
        }

        System.out.println(x + " " + y);
    }

    private static int getD(String s) {
        if (s.equals("U")) return 0;
        if (s.equals("R")) return 1;
        if (s.equals("D")) return 2;
        return 3;
    }
}

9、斐波那契

解法一:暴力法(4/7)

package fiveSession;

import java.util.Scanner;

/*** 2014第五届  9、斐波那契,暴力法1 ***/
public class test9 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long m = sc.nextLong();
        long p = sc.nextLong();
        long sum = 1;
        long t = 0, f1 = 0, f2 = 1, mMod = 0;
        for (long i = 2; i <= n; i++) {
            t = f2 + f1;
            f1 = f2;
            f2 = t;
            sum += t;
            if (i == m) mMod = t;
        }
        if (m > n) {
            for (long i = n + 1; i <= m; i++) {
                t = f2 + f1;
                f1 = f2;
                f2 = t;
            }
            mMod = f2;
        }

        System.out.println(sum % mMod % p);
    }
}

解法二:公式定理+矩阵运算

我这个水平,能暴力就暴力,现在记公式定理性价比不高,推理构造的到时可以深究一下。

有兴趣的可以看一下参考:从蓝桥杯来谈Fibonacci数列


10、波动数列

解法一:枚举首项+dfs(2/8)

x x+a x+2a x+3a ··· x+(n-1)a s = nx + n(n-1)a/2

x x-b x-2b x-3b ··· x-(n-1)b s = nx - n(n-1)b/2

通过上式可以求出首项x的范围

package fiveSession;

import java.util.Scanner;

/*** 2014第五届  10、波动数列 ***/
public class test10 {
    static int n, s, a, b;
    static long ans;
    static final int MOD = (int)1e8 + 7;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        s = sc.nextInt();
        a = sc.nextInt();
        b = sc.nextInt();
        sc.close();

        // x x+a x+2a x+3a ··· x+(n-1)a    s = nx + n(n-1)a/2
        //x x-b x-2b x-3b ··· x-(n-1)b     s = nx - n(n-1)b/2
        int minX = (s - (n - 1) * n * a / 2) / n;
        int maxX = (s + (n - 1) * n * b / 2) / n;
        for (int x = minX; x <= maxX; x++) {
            dfs(x, 1, x);
        }

        System.out.println(ans);
    }

    private static void dfs(int x, int cnt, int sum) {
        if (cnt == n) {
            if (sum == s) {
                ans++;
                if (ans > MOD) ans %= MOD;
            }
            return;
        }
        dfs(x + a, cnt + 1, sum + x + a);
        dfs(x - b, cnt + 1, sum + x - b);
    }
}

优化:枚举a,b的数目+dfs(2/8)

package fiveSession;

import java.util.Scanner;

/*** 2014第五届  10、波动数列, 优化枚举 ***/
public class test10_2 {
    static int n, s, a, b;
    static long ans;
    static final int MOD = (int)1e8 + 7;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        s = sc.nextInt();
        a = sc.nextInt();
        b = sc.nextInt();
        sc.close();

        // x x+p x+2p x+3p ··· x+(n-1)p    s = nx + n(n-1)p/2
        // t = n(n-1)/2
        // 若a的数目为ta, 则b数目为tb
        int t = n * (n - 1) / 2;
        long minX = (s - a * t) / n;
        long maxX = (s + b * t) / n;
        for (long x = minX; x <= maxX; x++) {
            for (long ta = 0; ta <= t; ta++) {
                // 减少对x的枚举
                long curSum = x * n + ta * a - (t - ta) * b;
                if (curSum == s) dfs(x, 1, x);
            }
        }

        System.out.println(ans);
    }

    private static void dfs(long x, int cnt, long sum) {
        if (cnt == n) {
            if (sum == s) {
                ans++;
                if (ans > MOD) ans %= MOD;
            }
            return;
        }
        dfs(x + a, cnt + 1, sum + x + a);
        dfs(x - b, cnt + 1, sum + x - b);
    }
}

解法二:动态规划,求a和b的组合数(7/10)

package fiveSession;

import java.util.Scanner;

/*** 2014第五届  10、波动数列, 动态规划 ***/
public class test10_3{
    static int n, s, a, b;
    static long ans;
    static final int MOD = (int)1e8 + 7;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        s = sc.nextInt();
        a = sc.nextInt();
        b = sc.nextInt();
        sc.close();

        dpMethod();
        System.out.println(ans);
    }

    private static void dpMethod() {
        int t = n * (n - 1) / 2;
        // dp[i][j]表示用前i个数组成值j的组合数方法
        int[][] dp = new int[n][t + 1];
        dp[0][0] = 1;
        for (int i = 0; i < n; i++) dp[i][0] = 1;
        for (int i = 1; i < n; i++) {
            for (int j = 1; j <= t; j++) {
                if (i > j) {
                    dp[i][j] = dp[i - 1][j];
                } else {
                    dp[i][j] = dp[i - 1][j] + dp[i - 1][j - i];
                }
                dp[i][j] %= MOD;
            }
        }

        for (int ta = 0; ta <= t; ta++) {
            if ((s - ta * a + (t - ta) * b) % n == 0) {
                ans = (ans + dp[n - 1][ta]) % MOD;
            }
        }
    }
}

优化:动态规划+滚动数组将状态压缩为二维(7/10)

package fiveSession;

import java.util.Scanner;

/*** 2014第五届  10、波动数列, 动态规划 ***/
public class test10_3{
    static int n, s, a, b;
    static long ans;
    static final int MOD = (int)1e8 + 7;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        s = sc.nextInt();
        a = sc.nextInt();
        b = sc.nextInt();
        sc.close();

        dpMethod2();
        System.out.println(ans);
    }

    private static void dpMethod2() {
        int t = n * (n - 1) / 2;
        // dp[i][j]表示用前i个数组成值j的组合数方法
        int[][] dp = new int[2][t + 1];
        dp[0][0] = dp[1][0] = 1;
        int row = 0;
        for (int i = 1; i < n; i++) {
            row = 1 - row;
            for (int j = 1; j <= t; j++) {
                if (i > j) {
                    dp[row][j] = dp[1 - row][j];
                } else {
                    dp[row][j] = dp[1 - row][j] + dp[1 - row][j - i];
                }
                dp[row][j] %= MOD;
            }
        }

        for (long ta = 0; ta <= t; ta++) {
            if ((s - ta * a + (t - ta) * b) % n == 0) {
                ans = (ans + dp[row][(int)ta]) % MOD;
            }
        }
    }
}

优化:动态规划+状态压缩为一维(10/10)

package fiveSession;

import java.util.Scanner;

/*** 2014第五届  10、波动数列, 动态规划 ***/
public class test10_3{
    static int n, s, a, b;
    static long ans;
    static final int MOD = (int)1e8 + 7;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        n = sc.nextInt();
        s = sc.nextInt();
        a = sc.nextInt();
        b = sc.nextInt();
        sc.close();

        dpMethod3();
        System.out.println(ans);
    }

    private static void dpMethod3() {
        int t = n * (n - 1) / 2;
        // dp[i][j]表示用前i个数组成值j的组合数方法
        int[] dp = new int[t + 1];
        dp[0] = 1;
        for (int i = 1; i < n; i++) {
            // 减少j的枚举
            for (int j = i * (i + 1) / 2; j >= i; j--) {
                dp[j] = (dp[j] + dp[j - i]) % MOD;
            }
        }

        for (long ta = 0; ta <= t; ta++) {
            if ((s - ta * a + (t - ta) * b) % n == 0) {
                ans = (ans + dp[(int)ta]) % MOD;
            }
        }
    }

}

这道题目的两种方法的一步步优化真的惊艳到我了!佩服佩服!


参考资料:【蓝桥杯JavaA组】2013-2018年试题讲解(附含C语言版)

总的来说排列组合和动态规划涉及的很多,动态规划永远的伤啊~

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/354427.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Linux 操作系统原理 — NUMA 体系结构

目录 文章目录 目录NUMA 体系结构NUMA 的基本概念查看 Host 的 NUMA TopologyBash 脚本DPDK 脚步NUMA 体系结构 NUMA(Non-Uniform Memory Access,非一致性存储器访问)的设计理念是将 CPU 和 Main Memory 进行分区自治(Local NUMA node),又可以跨区合作(Remote NUMA nod…

操作系统 三(存储管理)

一、 存储系统的“金字塔”层次结构设计原理&#xff1a;cpu自身运算速度很快。内存、外存的访问速度受到限制各层次存储器的特点&#xff1a;1&#xff09;主存储器&#xff08;主存/内存/可执行存储器&#xff09;保存进程运行时的程序和数据&#xff0c;内存的访问速度远低于…

【信管12.2】知识管理与知识产权

知识管理与知识产权想必你对知识的概念多少都会有一些自己的理解&#xff0c;毕竟我们经过了那么多年的教育&#xff0c;学来学去可不都学习的是“知识”嘛。在今天的学习中&#xff0c;内容还是会比较多&#xff0c;因为除了知识管理相关的内容之外&#xff0c;还有知识产权相…

Matlab 最小二乘法拟合平面(SVD)

文章目录 一、简介1.1最小二乘法拟合平面1.2 SVD角度二、实现代码三、实现效果参考资料一、简介 1.1最小二乘法拟合平面 之前我们使用过最为经典的方式对平面进行了最小二乘拟合(点云最小二乘法拟合平面),其推导过程如下所示: 仔细观察一下可以发现

IP协议

网络层的一个重要作用就是把世界上的地址能够以一定的规范定义出来。地址管理路由选择网络层的代表:IP协议4位版本指的是&#xff1a;此处的取值只有两个ipv4,ipv64位首部长度&#xff1a;描述了ip报头有多长&#xff08;ip报头是变长的&#xff09;报头中有一个选项部分&#…

JUnit5文档整理

1、Overview 1.1、Junit5是什么 与以前的JUnit版本不同&#xff0c;JUnit 5是由三个不同子项目的几个不同的模块组成。 JUnit 5 JUnit Platform&#xff08;基础平台&#xff09; JUnit Jupiter&#xff08;核心程序&#xff09; JUnit Vintage&#xff08;老版本的支持&a…

JVM那些事——垃圾回收和内存分配

内存分配 默认情况下新生代和老年区的内存比例是1:2&#xff0c;新生代中Eden区和Survivor区的比例是8:1。 对象优先分配在Eden区。大对象直接进入老年区。通过-XX:PertenureizeThreshold参数设置临界值。长期存活的对象进入老年区。对象每熬过一次Minor GC&#xff0c;年龄1&…

【面试题】Map和Set

1. Map和Object的区别 形式不同 // Object var obj {key1: hello,key2: 100,key3: {x: 100} } // Map var m new Map([[key1, hello],[key2, 100],[key3, {x: 100}] ])API不同 // Map的API m.set(name, 小明) // 新增 m.delete(key2) // 删除 m.has(key3) // …

操作系统闲谈06——进程管理

操作系统闲谈06——进程管理 一、进程调度 01 时间片轮转 给每一个进程分配一个时间片&#xff0c;然后时间片用完了&#xff0c;把cpu分配给另一个进程 时间片通常设置为 20ms ~ 50ms 02 先来先服务 就是维护了一个就绪队列&#xff0c;每次选择最先进入队列的进程&#…

Prometheus PromQL入门

一、Prometheus简介和架构 Prometheus 是由 SoundCloud 开源监控告警解决方案。架构图如下&#xff1a; 如上图&#xff0c;Prometheus主要由以下部分组成&#xff1a; Prometheus Server&#xff1a;用于抓取和存储时间序列化数据Exporters&#xff1a;主动拉取数据的插件P…

Chrome开发者工具:利用网络面板做性能分析

Chrome 开发者工具&#xff08;简称 DevTools&#xff09;是一组网页制作和调试的工具&#xff0c;内嵌于 Google Chrome 浏览器中。 Chrome 开发者工具有很多重要的面板&#xff0c;比如与性能相关的有网络面板、Performance 面板、内存面板等&#xff0c;与调试页面相关的有…

字符串匹配 - 模式预处理:BM 算法 (Boyer-Moore)

各种文本编辑器的"查找"功能&#xff08;CtrlF&#xff09;&#xff0c;大多采用Boyer-Moore算法&#xff0c;效率非常高。算法简介在 1977 年&#xff0c;Robert S. Boyer (Stanford Research Institute) 和 J Strother Moore (Xerox Palo Alto Research Center) 共…

SpringCloud(二)负载均衡服务调用Ribbon、服务接口调用OpenFeign案例详解

五、负载均衡服务调用Ribbon 技术版本Spring Cloud版本Hoxton.SR1Spring Boot版本2.2.2RELEASECloud Alibaba版本2.1.0.RELEASE Spring Cloud Ribbon是基于Netflix Ribbon实现的一套客户端负载均衡的工具。 简单的说&#xff0c;Ribbon是Netflix发布的开源项目&#xff0c;主…

DOS经典软件,落下帷幕,新型国产平台,蓬勃发展

提起DOS时代&#xff0c;总让人难以忘怀&#xff0c;陷入深深回忆中&#xff0c;风靡一时的许多软件&#xff0c;如今早已不在&#xff0c;这几款被称为DOS必装的软件&#xff0c;更是让人惋惜。 你还记得这图吗&#xff1f;堪称DOS系统最经典的软盘复制与映像生成软件&#xf…

八十九——一三三

八十九、JavaScript——数组的简介 一、数组 数组(Array) - 数组也是一中复合数据类型&#xff0c;在数组可以存储多个不同类型的数据 - 数组中存储的是有序的数据&#xff0c;数组中的每个数据有一个唯一的索引 可以通过索引来操作获取数据 - 数据中存储的数据叫元素 - 索引&…

从 MVC 架构到三层(3-Tier)架构

一、MVC 存在的痛点问题 对于业务逻辑不甚复杂的场景&#xff0c;MVC 尚能胜任。但随着前端 MVVM&#xff08;Model-View-View-Model&#xff09;开发模式的兴起&#xff0c;尤其是前端框架如 Vue、React 的普及&#xff0c;服务端的 MVC 设计模式使用场景变得越来越少&#x…

NetSuite Intercompany Framework 101

今朝&#xff0c;谈一谈Intercompany Framework&#xff0c;这是一个彰显NetSuite市场野心的基础功能框架。从20.2开始逐渐浮出水面&#xff0c;虽然经过过往的几个版本&#xff0c;不断推出组成功能&#xff0c;但目前仍然未见其全貌。 作为顾问&#xff0c;你必须关注它&…

详解JavaScript的形参,实参以及传参

文章目录 前言一、参数是什么&#xff1f;二、形参和实参 1.形参 2.实参三、传参 1.参数传递的对应关系2.两个传参的例子 总结前言 编程初学者在接触JavaScript这门语言时&#xff0c;很难搞懂里面的逻辑&#xff0c;这就会导致入门慢&#xff0c;入门难。这种难度一般…

Banana Pi BPI-R3 评测:详细信息、功能

Banana Pi BPI-R3 路由板著名的 Banana Pi 品牌背后的公司 Sinovoip Co., Ltd 刚刚宣布了一款名为 Banana Pi BPI-R3 的带有两个 SFP 端口的新型开源路由器。它可能是市场上首批具有内置光接口的单板路由器之一。这种出色的产品对于连接到快速光纤互联网的用户特别有益&#xf…

【PyTorch学习4】《PyTorch深度学习实践》——线性回归(Linear Regression)

目录一、实现框架二、程序实现三、代码讲解1.self.linear torch.nn.Linear(1, 1)2.model(x_data)3.criterion torch.nn.MSELoss(reductionsum)&#xff0c;loss criterion(y_pred, y_data)一、实现框架 1、Prepare dataset 2、Design model using Class (inherit from nn.M…