【算法笔记自学】第 5 章 入门篇(3)——数学问题

5.1简单数学

#include <cstdio>
#include <algorithm>
using namespace std;
bool cmp(int a,int b){
     return a>b;
}
void to_array(int n,int num[]){
    for(int i=0;i<4;i++){
        num[i]=n%10;
        n /=10;
     }
}
int to_number(int num[]){
    int sum=0;
    for(int i=0;i<4;i++){
        sum=sum*10+num[i];
    }
    return sum;
}
int main(){
    int n,MIN,MAX;
    scanf("%d",&n);
    int num[5];
    while(1){
       to_array(n,num);
       sort(num,num+4);
       MIN=to_number(num);
       sort(num,num+4,cmp);
       MAX=to_number(num);
       n=MAX-MIN;
       printf("%04d-%04d=%04d\n",MAX,MIN,n);
       if(n==0||n==6174)break;
    }
    return 0;
}

#include <cstdio>
#include <cmath>

int main() {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    int delta = b * b - 4 * a * c;
    if (delta < 0) {
        printf("No Solution");
    } else if (delta == 0) {
        printf("%.2f", -b / (2.0 * a));
    } else {
        printf("%.2f %.2f",  (-b - sqrt((double)delta)) / (2.0 * a), (-b + sqrt((double)delta)) / (2.0 * a));
    }
    return 0;
}

5.2最大公约数与最小公倍数

#include <cstdio>
#include <cmath>
int gcd(int a,int b){
    if(b==0)return a;//求最大公约数的辗转相除法递归写法
    else return gcd(b,a%b);
}
int main() {
    int m,n;
    while(scanf("%d%d",&m,&n)!=EOF){
        printf("%d\n",gcd(m,n));
    }
    return 0;
}

#include <cstdio>

int gcd(int a, int b) {
    if (b == 0) {
        return a;
    } else {
        return gcd(b, a % b);
    }
}

int main() {
    int a, b;
    scanf("%d%d", &a, &b);
    printf("%d", a / gcd(a, b) * b);
    return 0;
}

5.3分数的四则运算

#include <cstdio>
#include <algorithm>
using namespace std;

struct Fraction {
    int up, down;
};

int gcd(int a, int b) {
    if (b == 0) {
        return a;
    } else {
        return gcd(b, a % b);
    }
}

Fraction reduction(Fraction fraction) {
    if (fraction.down < 0) {
        fraction.up = -fraction.up;
        fraction.down = -fraction.down;
    }
    if (fraction.up == 0) {
        fraction.down = 1;
    } else {
        int d = gcd(abs(fraction.up), abs(fraction.down));
        fraction.up /= d;
        fraction.down /= d;
    }
    return fraction;
}

int main() {
    Fraction fraction;
    scanf("%d%d", &fraction.up, &fraction.down);
    Fraction result = reduction(fraction);
    if (result.down == 1) {
        printf("%d", result.up);
    } else {
        printf("%d %d", result.up, result.down);
    }
    return 0;
}

#include <cstdio>
#include <algorithm>
using namespace std;

struct Fraction {
    int up, down;
};

int gcd(int a, int b) {
    if (b == 0) {
        return a;
    } else {
        return gcd(b, a % b);
    }
}

Fraction reduction(Fraction fraction) {
    if (fraction.down < 0) {
        fraction.up = -fraction.up;
        fraction.down = -fraction.down;
    }
    if (fraction.up == 0) {
        fraction.down = 1;
    } else {
        int d = gcd(abs(fraction.up), abs(fraction.down));
        fraction.up /= d;
        fraction.down /= d;
    }
    return fraction;
}

Fraction add(Fraction f1, Fraction f2) {
    Fraction result;
    result.up = f1.up * f2.down + f2.up * f1.down;
    result.down = f1.down * f2.down;
    return reduction(result);
}

int main() {
    Fraction f1, f2;
    scanf("%d%d%d%d", &f1.up, &f1.down, &f2.up, &f2.down);
    Fraction result = add(f1, f2);
    if (result.down == 1) {
        printf("%d", result.up);
    } else {
        printf("%d %d", result.up, result.down);
    }
    return 0;
}

#include <cstdio>
#include <algorithm>
using namespace std;

struct Fraction {
    int up, down;
};

int gcd(int a, int b) {
    if (b == 0) {
        return a;
    } else {
        return gcd(b, a % b);
    }
}

Fraction reduction(Fraction fraction) {
    if (fraction.down < 0) {
        fraction.up = -fraction.up;
        fraction.down = -fraction.down;
    }
    if (fraction.up == 0) {
        fraction.down = 1;
    } else {
        int d = gcd(abs(fraction.up), abs(fraction.down));
        fraction.up /= d;
        fraction.down /= d;
    }
    return fraction;
}

Fraction sub(Fraction f1, Fraction f2) {
    Fraction result;
    result.up = f1.up * f2.down - f2.up * f1.down;
    result.down = f1.down * f2.down;
    return reduction(result);
}

int main() {
    Fraction f1, f2;
    scanf("%d%d%d%d", &f1.up, &f1.down, &f2.up, &f2.down);
    Fraction result = sub(f1, f2);
    if (result.down == 1) {
        printf("%d", result.up);
    } else {
        printf("%d %d", result.up, result.down);
    }
    return 0;
}

#include <cstdio>
#include <algorithm>
using namespace std;

struct Fraction {
    int up, down;
};

int gcd(int a, int b) {
    if (b == 0) {
        return a;
    } else {
        return gcd(b, a % b);
    }
}

Fraction reduction(Fraction fraction) {
    if (fraction.down < 0) {
        fraction.up = -fraction.up;
        fraction.down = -fraction.down;
    }
    if (fraction.up == 0) {
        fraction.down = 1;
    } else {
        int d = gcd(abs(fraction.up), abs(fraction.down));
        fraction.up /= d;
        fraction.down /= d;
    }
    return fraction;
}

Fraction multiply(Fraction f1, Fraction f2) {
    Fraction result;
    result.up = f1.up * f2.up;
    result.down = f1.down * f2.down;
    return reduction(result);
}

int main() {
    Fraction f1, f2;
    scanf("%d%d%d%d", &f1.up, &f1.down, &f2.up, &f2.down);
    Fraction result = multiply(f1, f2);
    if (result.down == 1) {
        printf("%d", result.up);
    } else {
        printf("%d %d", result.up, result.down);
    }
    return 0;
}

#include <cstdio>
#include <algorithm>
using namespace std;

struct Fraction {
    int up, down;
};

int gcd(int a, int b) {
    if (b == 0) {
        return a;
    } else {
        return gcd(b, a % b);
    }
}

Fraction reduction(Fraction fraction) {
    if (fraction.down < 0) {
        fraction.up = -fraction.up;
        fraction.down = -fraction.down;
    }
    if (fraction.up == 0) {
        fraction.down = 1;
    } else {
        int d = gcd(abs(fraction.up), abs(fraction.down));
        fraction.up /= d;
        fraction.down /= d;
    }
    return fraction;
}

Fraction div(Fraction f1, Fraction f2) {
    Fraction result;
    result.up = f1.up * f2.down;
    result.down = f1.down * f2.up;
    return reduction(result);
}

int main() {
    Fraction f1, f2;
    scanf("%d%d%d%d", &f1.up, &f1.down, &f2.up, &f2.down);
    Fraction result = div(f1, f2);
    if(!f2.up){
    	printf("undefined");
	}
    else if (result.down == 1) {
        printf("%d", result.up);
    } else {
        printf("%d %d", result.up, result.down);
    }
    return 0;
}

5.4素数 

#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
bool isPrime(int n){
    if(n<=1)return false;
    int sqr=(int)sqrt(1.0*n);
    for(int i=2;i<=sqr;i++){
        if(n%i==0)return false;
    }
    return true;

}
int main() {
    int n;
    scanf("%d",&n);
    if(isPrime(n))printf("Yes");
    else printf("No");
    return 0;
}

#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
bool isPrime(int n){
    if(n<=1)return false;
    int sqr=(int)sqrt(1.0*n);
    for(int i=2;i<=sqr;i++){
        if(n%i==0)return false;
    }
    return true;

}
int main() {
    int n;
    scanf("%d",&n);
    for(int i=1;i<n+1;i++)
    {
        if(isPrime(i))printf("%d\n",i);

    }
    return 0;
}

5.5质因子分解

#include <cstdio>
int main() {
    int n;
    scanf("%d", &n);
    int counter = 0;
    while (n % 2 == 0) {
        counter++;
        n /= 2;
    }
    printf("%d", counter);
    return 0;
}

#include <cstdio>
#include <cmath>
#include <cstring>
#include <vector>
using namespace std;

const int MAXN = 1000 + 1;
bool isPrime[MAXN];
vector<int> primes;

void getPrimes(int n) {
    memset(isPrime, true, sizeof(isPrime));
    for (int i = 2; i <= n; i++) {
        if (isPrime[i]) {
            primes.push_back(i);
            for (int j = i + i; j <= n; j += i) {
                isPrime[j] = false;
            }
        }
    }
}

int main() {
    int n;
    scanf("%d", &n);
    getPrimes((int)sqrt(1.0 * n));
    for (int i = 0; i < primes.size() && n > 1; i++) {
        int counter = 0;
        while (n > 1 && n % primes[i] == 0) {
            counter++;
            n /= primes[i];
        }
        if (counter > 0) {
            printf("%d %d\n", primes[i], counter);
        }
    }
    if (n > 1) {
        printf("%d 1", n);
    }
    return 0;
}

5.6大整数运算 

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

typedef vector<int> BigInt;

BigInt toBigInt(string nums) {
    BigInt result;
    for (int i = (int)nums.length() - 1; i >= 0; i--) {
        result.push_back(nums[i] - '0');
    }
    return result;
}

int compare(BigInt a, BigInt b) {
    if (a.size() > b.size()) {
        return 1;
    } else if (a.size() < b.size()) {
        return -1;
    } else {
        for (int i = (int)a.size() - 1; i >= 0; i--) {
            if (a[i] > b[i]) {
                return 1;
            } else if (a[i] < b[i]) {
                return -1;
            }
        }
        return 0;
    }
}

int main() {
    string nums1, nums2;
    cin >> nums1 >> nums2;
    BigInt a = toBigInt(nums1);
    BigInt b = toBigInt(nums2);
    int compareResult = compare(a, b);
    if (compareResult < 0) {
        printf("a < b");
    } else if (compareResult > 0) {
        printf("a > b");
    } else {
        printf("a = b");
    }
}

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

typedef vector<int> BigInt;

BigInt toBigInt(string nums) {
    BigInt result;
    for (int i = (int)nums.length() - 1; i >= 0; i--) {
        result.push_back(nums[i] - '0');
    }
    return result;
}

BigInt add(BigInt a, BigInt b) {
    BigInt c;
    int carry = 0;
    for (int i = 0; i < a.size() || i < b.size(); i++) {
        int aDigit = i < a.size() ? a[i] : 0;
        int bDigit = i < b.size() ? b[i] : 0;
        int sum = aDigit + bDigit + carry;
        c.push_back(sum % 10);
        carry = sum / 10;
    }
    if (carry) {
        c.push_back(carry);
    }
    return c;
}

void print(BigInt a) {
    for (int i = (int)a.size() - 1; i >= 0; i--) {
        cout << a[i];
    }
}

int main() {
    string nums1, nums2;
    cin >> nums1 >> nums2;
    BigInt a = toBigInt(nums1);
    BigInt b = toBigInt(nums2);
    print(add(a, b));
    return 0;
}

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

typedef vector<int> BigInt;

BigInt toBigInt(string nums) {
    BigInt result;
    for (int i = (int)nums.length() - 1; i >= 0; i--) {
        result.push_back(nums[i] - '0');
    }
    return result;
}
int compare(BigInt a, BigInt b) {
    if (a.size() > b.size()) {
        return 1;
    } else if (a.size() < b.size()) {
        return -1;
    } else {
        for (int i = (int)a.size() - 1; i >= 0; i--) {
            if (a[i] > b[i]) {
                return 1;
            } else if (a[i] < b[i]) {
                return -1;
            }
        }
        return 0;
    }
}
BigInt sub(BigInt a, BigInt b) {
    BigInt c;
    for (int i = 0; i < a.size() || i < b.size(); i++) {
        int bDigit = i < b.size() ? b[i] : 0;
        if (a[i] < bDigit) {
            a[i + 1]--;
            a[i] += 10;
        }
        c.push_back(a[i] - bDigit);
    }
     while (c.size() > 1 && c.back() == 0) {
        c.pop_back();
    }
    return c;
}

void print(BigInt a) {
    for (int i = (int)a.size() - 1; i >= 0; i--) {
        cout << a[i];
    }
}

int main() {
    string nums1, nums2;
    cin >> nums1 >> nums2;
    BigInt a = toBigInt(nums1);
    BigInt b = toBigInt(nums2);
     if (compare(a, b) >= 0) {
        print(sub(a, b));
    } else {
        cout << "-";
        print(sub(b, a));
    }
    return 0;
}

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

typedef vector<int> BigInt;

BigInt toBigInt(string nums) {
    BigInt result;
    for (int i = (int)nums.length() - 1; i >= 0; i--) {
        result.push_back(nums[i] - '0');
    }
    return result;
}
int compare(BigInt a, BigInt b) {
    if (a.size() > b.size()) {
        return 1;
    } else if (a.size() < b.size()) {
        return -1;
    } else {
        for (int i = (int)a.size() - 1; i >= 0; i--) {
            if (a[i] > b[i]) {
                return 1;
            } else if (a[i] < b[i]) {
                return -1;
            }
        }
        return 0;
    }
}
BigInt mul(BigInt a, int b) {
    BigInt c;
    int carry=0;;
    for (int i = 0; i < a.size(); i++) {
        int temp=a[i]*b+carry;
        c.push_back(temp%10);
        carry=temp/10;
    }
    while(carry!=0){
        c.push_back(carry%10);
        carry/=10;
    }
    while (c.size() > 1 && c.back() == 0) {
        c.pop_back();
    }
    return c;
}

void print(BigInt a) {
    for (int i = (int)a.size() - 1; i >= 0; i--) {
        cout << a[i];
    }
}

int main() {
     string nums;
    int b;
    cin >> nums >> b;
    BigInt a = toBigInt(nums);
    print(mul(a, b));
    return 0;
    return 0;
}

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

typedef vector<int> BigInt;

BigInt toBigInt(string nums) {
    BigInt result;
    for (int i = (int)nums.length() - 1; i >= 0; i--) {
        result.push_back(nums[i] - '0');
    }
    return result;
}

BigInt mul(BigInt a, BigInt b) {
    BigInt c = BigInt(a.size() + b.size() + 1, 0);
    for (int i = 0; i < a.size(); i++) {
        for (int j = 0; j < b.size(); j++) {
            c[i + j] += a[i] * b[j];
        }
    }
    for (int i = 0; i < a.size() + b.size(); i++) {
        if (c[i] >= 10) {
            c[i + 1] += c[i] / 10;
            c[i] = c[i] % 10;
        }
    }
    while (c.size() > 1 && c.back() == 0) {
        c.pop_back();
    }
    return c;
}

void print(BigInt a) {
    for (int i = (int)a.size() - 1; i >= 0; i--) {
        cout << a[i];
    }
}

int main() {
    string nums1, nums2;
    cin >> nums1 >> nums2;
    BigInt a = toBigInt(nums1);
    BigInt b = toBigInt(nums2);
    print(mul(a, b));
    return 0;
}

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

typedef vector<int> BigInt;

BigInt toBigInt(string nums) {
    BigInt result;
    for (int i = (int)nums.length() - 1; i >= 0; i--) {
        result.push_back(nums[i] - '0');
    }
    return result;
}

BigInt div(BigInt a, int b, int &r) {
    BigInt c;
    for (int i = (int)a.size() - 1; i >= 0; i--) {
        r = r * 10 + a[i];
        c.push_back(r / b);
        r = r % b;
    }
    reverse(c.begin(), c.end());
    while (c.size() > 1 && c.back() == 0) {
        c.pop_back();
    }
    return c;
}

void print(BigInt a) {
    for (int i = (int)a.size() - 1; i >= 0; i--) {
        cout << a[i];
    }
}

int main() {
    string nums;
    int b, r = 0;
    cin >> nums >> b;
    if (b == 0) {
        cout << "undefined";
        return 0;
    }
    BigInt a = toBigInt(nums);
    BigInt q = div(a, b, r);
    print(q);
    cout << " " << r;
    return 0;
}

5.7扩展欧几里得算法

#include <cstdio>
#include <algorithm>
using namespace std;

int gcd(int a, int b) {
    if (b == 0) {
        return a;
    } else {
        return gcd(b, a % b);
    }
}

int main() {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    printf(c % gcd(a, b) == 0 ? "Yes" : "No");
    return 0;
}

#include <cstdio>
#include <algorithm>
using namespace std;

int exGcd(int a, int b, int &x, int &y) {
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    int d = exGcd(b, a % b, x, y);
    int temp = x;
    x = y;
    y = temp - a / b * y;
    return d;
}

int main() {
    int a, b, x, y;
    scanf("%d%d", &a, &b);
    int d = exGcd(a, b, x, y);
    int step = b / d;
    int minX = (x % step + step) % step;
    printf("%d %d", minX, (d - a * minX) / b);
    return 0;
}

#include <cstdio>
#include <algorithm>
using namespace std;

int exGcd(int a, int b, int &x, int &y) {
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    int d = exGcd(b, a % b, x, y);
    int temp = x;
    x = y;
    y = temp - a / b * y;
    return d;
}

int solve(int a, int b, int c) {
    int x, y;
    int d = exGcd(a, b, x, y);
    if (c % d) {
        return -1;
    } else {
        int step = abs(b / d);
        int minX = (c * x / d % step + step) % step;
        return minX;
    }
}

int main() {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    int minX = solve(a, b, c);
    if (minX == -1) {
        printf("No Solution");
    } else {
        printf("%d %d", minX, (c - a * minX) / b);
    }
    return 0;
}

#include <cstdio>
#include <algorithm>
using namespace std;

int exGcd(int a, int b, int &x, int &y) {
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    int d = exGcd(b, a % b, x, y);
    int temp = x;
    x = y;
    y = temp - a / b * y;
    return d;
}

int solve(int a, int b, int c) {
    int x, y;
    int d = exGcd(a, b, x, y);
    if (c % d) {
        return -1;
    } else {
        int step = abs(b / d);
        int minX = (c * x / d % step + step) % step;
        return minX;
    }
}

int main() {
    int a, c, m, x, y;
    scanf("%d%d%d", &a, &c, &m);
    int minX = solve(a, m, c);
    if (minX == -1) {
        printf("No Solution");
    } else {
        printf("%d", minX);
    }
    return 0;
}

#include <cstdio>
#include <algorithm>
using namespace std;

int exGcd(int a, int b, int &x, int &y) {
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    int d = exGcd(b, a % b, x, y);
    int temp = x;
    x = y;
    y = temp - a / b * y;
    return d;
}

int invert(int a, int m) {
    int x, y;
    int d = exGcd(a, m, x, y);
    if (d != 1) {
        return -1;
    } else {
        return (x % m + m) % m;
    }
}

int main() {
    int a, m;
    scanf("%d%d", &a, &m);
    int result = invert(a, m);
    if (result == -1) {
        printf("No Solution");
    } else {
        printf("%d", result);
    }
    return 0;
}

#include <cstdio>
#include <algorithm>
using namespace std;

int exGcd(int a, int b, int &x, int &y) {
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    int d = exGcd(b, a % b, x, y);
    int temp = x;
    x = y;
    y = temp - a / b * y;
    return d;
}

int invert(int a, int m) {
    int x, y;
    int d = exGcd(a, m, x, y);
    if (d != 1) {
        return -1;
    } else {
        return (x % m + m) % m;
    }
}

int main() {
    int n, a, m, b;
    scanf("%d%d%d", &n, &a, &m);
    int result = invert(abs(a), m);
    for (int i = 0; i < n; i++) {
        scanf("%d", &b);
        result = (result * b) % m;
    }
    printf("%d", result);
    return 0;
}

5.8组合数

#include <cstdio>
int cal(int n,int p)
{
    if(n<p)return 0;
    return n/p+cal(n/p,p);

}
int main() {
    int n,p=2;
    scanf("%d", &n);
    printf("%d", cal(n,p));
    return 0;
}

#include <cstdio>

typedef long long LL;

LL C(LL n, LL m) {
    LL ans = 1;
    for (LL i = 1; i <= m; i++) {
        ans = ans * (n - m + i) / i;
    }
    return ans;
}

int main() {
    LL n, m;
    scanf("%lld%lld", &n, &m);
    printf("%lld", C(n, m));
    return 0;
}

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

计算组的妙用!!页面权限控制

需求描述&#xff1a; 某些特殊的场景下&#xff0c;针对某页看板&#xff0c;需要进行数据权限卡控&#xff0c;但是又不能对全部的数据进行RLS处理&#xff0c;这种情况下可以利用计算组来解决这个需求。 实际场景 事实表包含产品维度和销售维度 两个维度属于同一公司下面的…

搭建互联网医院实战:从源码到在线问诊APP的全流程开发

今天&#xff0c;笔者将讲述在线问诊APP的全流程开发&#xff0c;帮助开发者理解和掌握搭建互联网医院的核心技术和步骤。 一、需求分析与设计 需求分析包括明确目标用户、功能需求、性能需求等。设计阶段则包括系统架构设计、数据库设计和前后端界面设计等。 1.目标用户&…

柯桥职场英语学习商务英语口语生活英语培训生活口语学习

辣妹用英语怎么说&#xff1f; 辣妹在英语中通常被翻译为“hot girl”或“spicy girl”&#xff0c;但更常见和直接的是“hot chick”或简单地使用“hot”来形容。 举个例子: Shes a real hot girl with her trendy outfit and confident attitude. 她真是个辣妹&#xff0…

Ubuntu 20版本安装Redis教程

第一步 切换到root用户&#xff0c;使用su命令&#xff0c;进行切换。 输入&#xff1a; su - 第二步 使用apt命令来搜索redis的软件包&#xff0c;输入命令&#xff1a;apt search redis 第三步 选择需要的redis版本进行安装&#xff0c;本次选择默认版本&#xff0c;redis5.…

谷粒商城-记录创建工程和模块时遇到的两个问题

文章目录 一&#xff0c;Maven工程出现Gradle相关的信息1&#xff0c;问题描述2&#xff0c;解决办法 二&#xff0c;找不到maven插件1&#xff0c;问题描述2&#xff0c;解决方案 三&#xff0c;补充知识&#xff1a;Maven和Gradle 这篇记录几个在创建工程和模块后遇到的几个问…

代码随想录算法训练营第四十五天| 300.最长递增子序列、 674. 最长连续递增序列、 718. 最长重复子数组

300.最长递增子序列 题目链接&#xff1a;300.最长递增子序列 文档讲解&#xff1a;代码随想录 状态&#xff1a;不会&#xff0c;递推状态的时候只想着如何从dp[i-1]推导dp[i]&#xff0c;没想过可能需要枚举dp[0-i] 思路&#xff1a; 找出所有比自己小的数字的dp[j],在这些dp…

超过GPT-4V,国产开源多模态大模型来了!支持视频理解/超高分辨率图片理解/多轮对话...

扫码领取享50优惠&#xff01;随时可用&#xff0c;先到先得&#xff01; 大家好&#xff0c;开源多模态大模型真的是每天都在疯狂的涌现&#xff0c;今天分享一个国产大模型 InternLM-XComposer-2.5 中文名&#xff1a;浦语灵笔2.5 仅使用 7B LLM 后端就达到了 GPT-4V 级别的能…

全能PDF工具集 -- PDF Shaper Professional v14.3 特别版

软件简介 PDF Shaper是一款功能强大的PDF工具集&#xff0c;它提供了一系列用于处理PDF文档的工具。这款软件使用户能够轻松地转换、分割、合并、提取页面以及旋转和加密PDF文件。PDF Shaper的界面简洁直观&#xff0c;使得即使是新手用户也能快速上手。它支持广泛的功能&…

Okhttp hostnameVerifier详解

hostnameVerifier 方法简介核心原理参考资料 方法简介 本篇博文以Okhttp 4.6.0来解析hostnameVerfier的作用&#xff0c;顾名思义&#xff0c;该方法的主要作用就是鉴定hostnname的合法性。Okhttp在初始化的时候我们可以自己配置hostnameVerfier&#xff1a; new OkHttpClien…

奇迹MU 骷髅战士在哪

BOSS分布图介绍 我为大家带来各地区怪物分布图。在游戏前期&#xff0c;很多玩家可能会不知道该去哪里寻找怪物&#xff0c;也不知道哪些怪物值得打。如果选择了太强的怪物&#xff0c;弱小的玩家可能会无法抵御攻击。如果选择了低等级的boss&#xff0c;收益可能并不理想。所…

【数据库原理】课程笔记

数据库原理 一、数据库系统基础 数据模型的类型 概念数据模型&#xff1a; 概念数据模型也称概念模型或信息模型,是对现实世界中问题域内事务(特性)的描述,是以用户观点实现世界的模型(图形表示)。主要用于描述事物的概念化结构,使数据库的设计人员在设计初期,避开计算机系统及…

基于大象机器人UltraArm P340机械臂和传送带,实现教育场景中的自动化分拣系统!

引言 今天我们将展示一个高度自动化的模拟场景&#xff0c;展示多个机械臂与传送带协同工作的高效分拣系统。在这个场景中&#xff0c;机械臂通过视觉识别技术对物体进行分类&#xff0c;并通过精确的机械操作将它们放置在指定的位置。这一系统不仅提高了分拣的速度和准确性&am…

Go语言--复合类型之指针与数组

分类 指针 指针是一个代表着某个内存地址的值。这个内存地址往往是在内存中存储的另一个变量的值的起始位置。Go 语言对指针的支持介于 Java 语言和 C/C语言之间,它既没有想 Java 语言那样取消了代码对指针的直接操作的能力,也避免了 C/C语言中由于对指针的滥用而造成的安全和…

【紫外线发光器件小结】 UV-B LED 308nm

之前有介绍光的波长和频率计算。 波长小于390nm,频率高于770太赫兹的电磁波忙&#xff0c;或者光。基本有一段就叫做紫外线。 紫外线有分为UV-A/B/C;三小段&#xff1b; 如下图&#xff1a; 高压汞灯与UV LED的光谱&#xff1b;黑色线汞灯&#xff0c;蓝色LED

通信协议:常见的芯片内通信协议

相关阅读 通信协议https://blog.csdn.net/weixin_45791458/category_12452508.html?spm1001.2014.3001.5482 本文将简单介绍一些常见的芯片间通信协议&#xff0c;但不会涉及到协议的具体细节。 一、AMBA&#xff08;Advanced Microcontroller Bus Architecture&#xff09;…

(七)[重制]C++命名空间与标准模板库(STL)

​ 引言 在专栏C教程的第六篇C中的结构体与联合体中&#xff0c;介绍了C中的结构体和联合体&#xff0c;包括它们的定义、初始化、内存布局和对齐&#xff0c;以及作为函数参数和返回值的应用。在专栏C教程的第七篇中&#xff0c;我们将深入了解C中的命名空间&#xff08;nam…

C++(Qt)-GIS开发-简易瓦片地图下载器

Qt-GIS开发-简易瓦片地图下载器 文章目录 Qt-GIS开发-简易瓦片地图下载器1、概述2、安装openssl3、实现效果4、主要代码4.1 算法函数4.2 瓦片地图下载url拼接4.3 多线程下载 5、源码地址6、参考 更多精彩内容&#x1f449;个人内容分类汇总 &#x1f448;&#x1f449;GIS开发 …

连锁门店如何快速联网

随着新零售业态的发展&#xff0c;连锁门店的运营模式逐渐转为数字化运营&#xff0c;新增了诸如收银PoS、扫码枪、摄像头等数字化终端。这些数字化的业务应用都需要依托稳定可靠的网络才能正常运转&#xff0c;在这样的背景下&#xff0c;连锁门店对网络连接的需求显得尤为关键…

C++下Protobuf学习

C下Protobuf简单学习 Protobuf&#xff08;Protocol Buffers&#xff09;协议是一种由 Google 开发的高效的、跨语言的、平台无关的数据序列化协议&#xff0c;提供二进制序列化格式和相关的技术&#xff0c;它用于高效地序列化和反序列化结构化数据&#xff0c;通常用于网络通…

WordPress网站违法关键词字过滤插件下载text-filter

插件下载地址&#xff1a;https://www.wpadmin.cn/2025.html 插件介绍 WordPress网站违法关键词字过滤插件text-filter由本站原创开发,支持中英文关键字自动替换成**号&#xff0c;可以通过自定义保存修改按钮增加“预设关键字”&#xff0c;也可以导入定义好的txt文本形式的关…