当前位置: 首页 > news >正文

AC修炼计划(AtCoder Regular Contest 180) A~C

A - ABA and BAB

A - ABA and BAB (atcoder.jp)

这道题我一开始想复杂了,一直在想怎么dp,没注意到其实是个很简单的规律题。

我们可以发现我们住需要统计一下类似ABABA这样不同字母相互交替的所有子段的长度,而每个字段的的情况有(长度+1)/2种,最后所有字段情况的乘积就是最终答案。

#pragma GCC optimize(3)  //O2优化开启
#include<bits/stdc++.h>
using namespace std;
#define int long long
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> PII;
// const int mod=1e9+7;
const int MX=0x3f3f3f3f3f3f3f3f; 
//inline int read()                     //快读
//{
//    int xr=0,F=1; char cr;
//    while(cr=getchar(),cr<'0'||cr>'9') if(cr=='-') F=-1;
//    while(cr>='0'&&cr<='9')
//        xr=(xr<<3)+(xr<<1)+(cr^48),cr=getchar();
//    return xr*F;
//}
//void write(int x)                     //快写
//{
//    if(x<0) putchar('-'),x=-x;
//    if(x>9) write(x/10); putchar(x%10+'0');
//}
// 比 unordered_map 更快的哈希表
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
// const int RANDOM = chrono::high_resolution_clock::now().time_since_epoch().count();
// struct chash {
//     int operator()(int x) const { return x ^ RANDOM; }
// };
// typedef gp_hash_table<int, int, chash> hash_t;
constexpr ll mod = 1e9 + 7;                                //此处为自动取模的数
class modint{ll num;
public:modint(ll num = 0) :num(num % mod){}ll val() const {return num;}modint pow(ll other) {modint res(1), temp = *this;while(other) {if(other & 1) res = res * temp;temp = temp * temp;other >>= 1;}return res;}constexpr ll norm(ll num) const {if (num < 0) num += mod;if (num >= mod) num -= mod;return num;}modint inv(){ return pow(mod - 2); }modint operator+(modint other){ return modint(num + other.num); }modint operator-(){ return { -num }; }modint operator-(modint other){ return modint(-other + *this); }modint operator*(modint other){ return modint(num * other.num); }modint operator/(modint other){ return *this * other.inv(); }modint &operator*=(modint other) { num = num * other.num % mod; return *this; }modint &operator+=(modint other) { num = norm(num + other.num); return *this; }modint &operator-=(modint other) { num = norm(num - other.num); return *this; }modint &operator/=(modint other) { return *this *= other.inv(); }friend istream& operator>>(istream& is, modint& other){ is >> other.num; other.num %= mod; return is; }friend ostream& operator<<(ostream& os, modint other){ other.num = (other.num + mod) % mod; return os << other.num; }
};int n;
string s;
void icealsoheat(){cin>>n;cin>>s;s=" "+s;int res=1;modint ans=1;for(int i=2;i<=n;i++){if(s[i]!=s[i-1]){res++;}else{if(res>=3){ans*=(res+1)/2;}res=1;}}if(res>=3){ans*=(res+1)/2;}cout<<ans;
}
signed main(){ios::sync_with_stdio(false);          //int128不能用快读!!!!!!cin.tie();cout.tie();int _yq;_yq=1;// cin>>_yq;while(_yq--){icealsoheat();}
}
//
//⠀⠀⠀             ⠀⢸⣿⣿⣿⠀⣼⣿⣿⣦⡀
//⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀ ⠀⢸⣿⣿⡟⢰⣿⣿⣿⠟⠁
//⠀⠀⠀⠀⠀⠀⠀⢰⣿⠿⢿⣦⣀⠀⠘⠛⠛⠃⠸⠿⠟⣫⣴⣶⣾⡆
//⠀⠀⠀⠀⠀⠀⠀⠸⣿⡀⠀⠉⢿⣦⡀⠀⠀⠀⠀⠀⠀ ⠛⠿⠿⣿⠃
//⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣦⠀⠀⠹⣿⣶⡾⠛⠛⢷⣦⣄⠀
//⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧⠀⠀⠈⠉⣀⡀⠀ ⠀⠙⢿⡇
//⠀⠀⠀⠀⠀⠀⢀⣠⣴⡿⠟⠋⠀⠀⢠⣾⠟⠃⠀⠀⠀⢸⣿⡆
//⠀⠀⠀⢀⣠⣶⡿⠛⠉⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⠀⠀⢸⣿⠇
//⢀⣠⣾⠿⠛⠁⠀⠀⠀⠀⠀⠀⠀⢀⣼⣧⣀⠀⠀⠀⢀⣼⠇
//⠈⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⠋⠙⠛⠛⠛⠛⠛⠁
//⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣾⡿⠋⠀
//⠀⠀⠀⠀⠀⠀⠀⠀⢾⠿⠋⠀
//

B - Improve Inversions

B - Improve Inversions (atcoder.jp)

这题确实不好想,但是get到点儿了就会觉得其实也不难。

我们需要尽可能的把逆序对最大化,从样例三我们可以发现,我们不妨确立左边一个要交换的下标i,然后找下标大于等于i+k,数值从大到小的找小于ai的数字,并依次与i的数字进行交换。为了尽可能减少替换的影响,我们按数值从小到大的次序去找这个下标i,从而参与上述的交换。因为我们是按从小到大的顺序的,所以小的数字参与交换并不会影响后面大的数字该交换的逆序对。

#pragma GCC optimize(3)  //O2优化开启
#include<bits/stdc++.h>
using namespace std;
#define int long long
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> PII;
// const int mod=1e9+7;
const int MX=0x3f3f3f3f3f3f3f3f; 
//inline int read()                     //快读
//{
//    int xr=0,F=1; char cr;
//    while(cr=getchar(),cr<'0'||cr>'9') if(cr=='-') F=-1;
//    while(cr>='0'&&cr<='9')
//        xr=(xr<<3)+(xr<<1)+(cr^48),cr=getchar();
//    return xr*F;
//}
//void write(int x)                     //快写
//{
//    if(x<0) putchar('-'),x=-x;
//    if(x>9) write(x/10); putchar(x%10+'0');
//}
// 比 unordered_map 更快的哈希表
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
// const int RANDOM = chrono::high_resolution_clock::now().time_since_epoch().count();
// struct chash {
//     int operator()(int x) const { return x ^ RANDOM; }
// };
// typedef gp_hash_table<int, int, chash> hash_t;
// constexpr ll mod = 1e9 + 7;                                //此处为自动取模的数
// class modint{
//     ll num;
// public:
//     modint(ll num = 0) :num(num % mod){}//     ll val() const {
//         return num;
//     }//     modint pow(ll other) {
//         modint res(1), temp = *this;
//         while(other) {
//             if(other & 1) res = res * temp;
//             temp = temp * temp;
//             other >>= 1;
//         }
//         return res;
//     }//     constexpr ll norm(ll num) const {
//         if (num < 0) num += mod;
//         if (num >= mod) num -= mod;
//         return num;
//     }//     modint inv(){ return pow(mod - 2); }
//     modint operator+(modint other){ return modint(num + other.num); }
//     modint operator-(){ return { -num }; }
//     modint operator-(modint other){ return modint(-other + *this); }
//     modint operator*(modint other){ return modint(num * other.num); }
//     modint operator/(modint other){ return *this * other.inv(); }
//     modint &operator*=(modint other) { num = num * other.num % mod; return *this; }
//     modint &operator+=(modint other) { num = norm(num + other.num); return *this; }
//     modint &operator-=(modint other) { num = norm(num - other.num); return *this; }
//     modint &operator/=(modint other) { return *this *= other.inv(); }
//     friend istream& operator>>(istream& is, modint& other){ is >> other.num; other.num %= mod; return is; }
//     friend ostream& operator<<(ostream& os, modint other){ other.num = (other.num + mod) % mod; return os << other.num; }
// };int n,k;
int a[200005];
int p[200005];
vector<PII>ans;
void icealsoheat(){cin>>n>>k;int bns=0;for(int i=1;i<=n;i++)cin>>a[i],p[a[i]]=i;for(int i=1;i<=n;i++){int id=p[i];int x=i;for(int j=i-1;j>=1;j--){if(p[j]>=id+k){// cout<<p[x]<<":::"<<p[j]<<"\n";ans.push_back({p[x],p[j]});a[id]=j;a[p[j]]=x;swap(p[x],p[j]);x=j;}}}cout<<ans.size()<<"\n";for(auto [i,j]:ans){cout<<i<<" "<<j<<"\n";}// for(int i=1;i<=n;i++){//     cout<<a[i]<<" ";// }}
signed main(){ios::sync_with_stdio(false);          //int128不能用快读!!!!!!cin.tie();cout.tie();int _yq;_yq=1;// cin>>_yq;while(_yq--){icealsoheat();}
}
//
//⠀⠀⠀             ⠀⢸⣿⣿⣿⠀⣼⣿⣿⣦⡀
//⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀ ⠀⢸⣿⣿⡟⢰⣿⣿⣿⠟⠁
//⠀⠀⠀⠀⠀⠀⠀⢰⣿⠿⢿⣦⣀⠀⠘⠛⠛⠃⠸⠿⠟⣫⣴⣶⣾⡆
//⠀⠀⠀⠀⠀⠀⠀⠸⣿⡀⠀⠉⢿⣦⡀⠀⠀⠀⠀⠀⠀ ⠛⠿⠿⣿⠃
//⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣦⠀⠀⠹⣿⣶⡾⠛⠛⢷⣦⣄⠀
//⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧⠀⠀⠈⠉⣀⡀⠀ ⠀⠙⢿⡇
//⠀⠀⠀⠀⠀⠀⢀⣠⣴⡿⠟⠋⠀⠀⢠⣾⠟⠃⠀⠀⠀⢸⣿⡆
//⠀⠀⠀⢀⣠⣶⡿⠛⠉⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⠀⠀⢸⣿⠇
//⢀⣠⣾⠿⠛⠁⠀⠀⠀⠀⠀⠀⠀⢀⣼⣧⣀⠀⠀⠀⢀⣼⠇
//⠈⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⠋⠙⠛⠛⠛⠛⠛⠁
//⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣾⡿⠋⠀
//⠀⠀⠀⠀⠀⠀⠀⠀⢾⠿⠋⠀
//

C - Subsequence and Prefix Sum

C - Subsequence and Prefix Sum (atcoder.jp)

一道非常巧妙的dp题,他的状态转移非常的奇妙。

我们考虑前i位的数字对后面数字的贡献值。可以分成两种情况。

1.第i位数字没有被选中

2.第i位数字被选中

当第i位数字被选中时,每一个位数i它所能合成的状态数字都对后面i+1到n的数字有相应的贡献。而这里面0的情况比较特殊,如果第i位的合成数字是0,其实不会改变下一个选中的数字。

这里面有一种情况比较特殊

例如1 -1 5 5 .........

这里我们会发现,我们选择1和-1后,选择第3个5和第4个5的情况是重复的,所以我们要想办法将它去重。

#pragma GCC optimize(3)  //O2优化开启
#include<bits/stdc++.h>
using namespace std;
#define int long long
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> PII;
// const int mod=1e9+7;
const int MX=0x3f3f3f3f3f3f3f3f; 
//inline int read()                     //快读
//{
//    int xr=0,F=1; char cr;
//    while(cr=getchar(),cr<'0'||cr>'9') if(cr=='-') F=-1;
//    while(cr>='0'&&cr<='9')
//        xr=(xr<<3)+(xr<<1)+(cr^48),cr=getchar();
//    return xr*F;
//}
//void write(int x)                     //快写
//{
//    if(x<0) putchar('-'),x=-x;
//    if(x>9) write(x/10); putchar(x%10+'0');
//}
// 比 unordered_map 更快的哈希表
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
// const int RANDOM = chrono::high_resolution_clock::now().time_since_epoch().count();
// struct chash {
//     int operator()(int x) const { return x ^ RANDOM; }
// };
// typedef gp_hash_table<int, int, chash> hash_t;
constexpr ll mod = 1e9 + 7;                                //此处为自动取模的数
class modint{ll num;
public:modint(ll num = 0) :num(num % mod){}ll val() const {return num;}modint pow(ll other) {modint res(1), temp = *this;while(other) {if(other & 1) res = res * temp;temp = temp * temp;other >>= 1;}return res;}constexpr ll norm(ll num) const {if (num < 0) num += mod;if (num >= mod) num -= mod;return num;}modint inv(){ return pow(mod - 2); }modint operator+(modint other){ return modint(num + other.num); }modint operator-(){ return { -num }; }modint operator-(modint other){ return modint(-other + *this); }modint operator*(modint other){ return modint(num * other.num); }modint operator/(modint other){ return *this * other.inv(); }modint &operator*=(modint other) { num = num * other.num % mod; return *this; }modint &operator+=(modint other) { num = norm(num + other.num); return *this; }modint &operator-=(modint other) { num = norm(num - other.num); return *this; }modint &operator/=(modint other) { return *this *= other.inv(); }friend istream& operator>>(istream& is, modint& other){ is >> other.num; other.num %= mod; return is; }friend ostream& operator<<(ostream& os, modint other){ other.num = (other.num + mod) % mod; return os << other.num; }
};int n,k;
int a[500005];
modint dp[105][5005];
modint sum[5005];
void icealsoheat(){cin>>n;for(int i=0;i<=20;i++)if(i!=10)sum[i]=1;for(int i=1;i<=n;i++)cin>>a[i];modint ans=1;for(int i=0;i<n;i++){dp[i][a[i]+1000]=dp[i][a[i]+1000]+sum[a[i]+10];sum[a[i]+10]=0;for(int j=0;j<=2000;j++){if(j==1000)continue;for(int o=i+1;o<=n;o++){// if(j+a[o]<0)cout<<"+++\n";if(j+a[o]<0)continue;dp[o][j+a[o]]+=dp[i][j];ans+=dp[i][j];}}for(int j=0;j<=20;j++){if(j!=10)sum[j]+=dp[i][1000];}}cout<<dp[2][1]<<"+++\n";cout<<ans;}
signed main(){ios::sync_with_stdio(false);          //int128不能用快读!!!!!!cin.tie();cout.tie();int _yq;_yq=1;// cin>>_yq;while(_yq--){icealsoheat();}
}
//
//⠀⠀⠀             ⠀⢸⣿⣿⣿⠀⣼⣿⣿⣦⡀
//⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀ ⠀⢸⣿⣿⡟⢰⣿⣿⣿⠟⠁
//⠀⠀⠀⠀⠀⠀⠀⢰⣿⠿⢿⣦⣀⠀⠘⠛⠛⠃⠸⠿⠟⣫⣴⣶⣾⡆
//⠀⠀⠀⠀⠀⠀⠀⠸⣿⡀⠀⠉⢿⣦⡀⠀⠀⠀⠀⠀⠀ ⠛⠿⠿⣿⠃
//⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣦⠀⠀⠹⣿⣶⡾⠛⠛⢷⣦⣄⠀
//⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣧⠀⠀⠈⠉⣀⡀⠀ ⠀⠙⢿⡇
//⠀⠀⠀⠀⠀⠀⢀⣠⣴⡿⠟⠋⠀⠀⢠⣾⠟⠃⠀⠀⠀⢸⣿⡆
//⠀⠀⠀⢀⣠⣶⡿⠛⠉⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⠀⠀⢸⣿⠇
//⢀⣠⣾⠿⠛⠁⠀⠀⠀⠀⠀⠀⠀⢀⣼⣧⣀⠀⠀⠀⢀⣼⠇
//⠈⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡿⠋⠙⠛⠛⠛⠛⠛⠁
//⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣾⡿⠋⠀
//⠀⠀⠀⠀⠀⠀⠀⠀⢾⠿⠋⠀
//

相关文章:

AC修炼计划(AtCoder Regular Contest 180) A~C

A - ABA and BAB A - ABA and BAB (atcoder.jp) 这道题我一开始想复杂了&#xff0c;一直在想怎么dp&#xff0c;没注意到其实是个很简单的规律题。 我们可以发现我们住需要统计一下类似ABABA这样不同字母相互交替的所有子段的长度&#xff0c;而每个字段的的情况有&#xff…...

云计算练习题

第一题&#xff1a;每周日晚上11点59分需要将/data目录打包压缩到/mnt目录下并以时间命名 #crontab -e 59 23 * * 7 /bin/tar czvf /mnt/date %F-data.tar.gz /data 59 23 * * 7 /bin/tar czvf /mnt/date %T.tar.gz /data 第二题&#xff1a;查找出系统中/application目录下所有…...

《战甲神兵》开发者报告:游戏崩溃问题80%发生在Intel可超频酷睿i9处理器上——酷睿i7 K系列CPU也表现出高崩溃率

在Intel持续面临第13代和第14代CPU崩溃问题的背景下&#xff0c;近日&#xff0c;《战甲神兵》(Warframe)的开发者们于7月9日披露了游戏崩溃的统计数据&#xff0c;并描述了诊断该问题的过程。根据开发团队的说法&#xff0c;一名未进行超频且使用全新PC的员工&#xff0c;即便…...

Postman下载及使用说明

Postman使用说明 Postman是什么&#xff1f; ​ Postman是一款接口对接工具【接口测试工具】 接口&#xff08;前端接口&#xff09;是什么&#xff1f; ​ 前端发送的请求普遍被称为接口 ​ 通常有网页的uri参数格式json/key-value请求方式post/get响应请求的格式json 接…...

什么是im即时通讯?WorkPlus im即时通讯私有化部署安全可控

IM即时通讯是Instant Messaging的缩写&#xff0c;指的是一种实时的、即时的电子信息交流方式&#xff0c;也被称为即时通讯。它通过互联网和移动通信网络&#xff0c;使用户能够及时交换文本消息、语音通话、视频通话、文件共享等信息。而WorkPlus im即时通讯私有化部署则提供…...

hnust 1794: 机器翻译

hnust 1794: 机器翻译 题目描述 小晨的电脑上安装了一个机器翻译软件&#xff0c;他经常用这个软件来翻译英语文章。 这个翻译软件的原理很简单&#xff0c;它只是从头到尾&#xff0c;依次将每个英文单词用对应的中文含义来替换。对于每个英文单词&#xff0c;软件会先在内存…...

AI人工智能开源大模型生态体系分析

人工智能开源大模型生态体系研究 "人工智能开源大模型生态体系研究报告v1.0"揭示&#xff0c;AI(A)的飞速发展依赖于三大核心&#xff1a;数据、算法和算力。这一理念已得到业界广泛认同&#xff0c;三者兼备才能推动AI的壮大发展。随着AI大模型的扩大与普及&#xf…...

ArkTS学习笔记_封装复用之@Styles装饰器

ArkTS学习笔记_封装复用之Styles装饰器 背景&#xff1a; 在开发中&#xff0c;如果每个组件的样式都需要单独设置&#xff0c;就会出现大量代码在进行重复样式设置&#xff0c;虽然可以复制粘贴&#xff0c;但为了代码简洁性和后续方便维护&#xff0c;给出的思路是&#xff…...

根据vue学习react

react的函数式组件与vue2是很像的 一、基础类似点 1、组件下拥有一个根节点&#xff0c;vue2是template&#xff0c;react是幽灵标签<> 2、vue2是{{}}以及v-model&#xff0c;react的绑定是{} 3、vue2编译html是v-html&#xff0c;react是{}&#xff0c;并且react的jsx中…...

Hi3861 OpenHarmony嵌入式应用入门--HTTPD

httpd 是 Apache HTTP Server 的守护进程名称&#xff0c;Apache HTTP Server 是一种广泛使用的开源网页服务器软件。 本项目是从LwIP中抽取的HTTP服务器代码&#xff1b; Hi3861 SDK中已经包含了一份预编译的lwip&#xff0c;但没有开启HTTP服务器功能&#xff08;静态库无法…...

MICS2024|少样本学习、多模态技术以及大语言模型在医学图像处理领域的研究进展|24-07-14

小罗碎碎念 本期推文主题 今天的会议很多主题都集中在大模型、多模态这两个方面&#xff0c;很明显&#xff0c;这两个方向都是目前的研究热点。 所以&#xff0c;我这一期推文会先简单的分析一下秦文健&#xff08;中科院&#xff09;和史淼晶&#xff08;同济大学&#xff09…...

ConfigMap-secrets-静态pod

一.ConfigMap 1.概述 ConfigMap资源&#xff0c;简称CM资源&#xff0c;它生成的键值对数据&#xff0c;存储在ETCD数据库中 应用场景&#xff1a;主要是对应用程序的配置 pod通过env变量引入ConfigMap&#xff0c;或者通过数据卷挂载volume的方式引入ConfigMap资源 官方解释…...

SQL Error: 1406, SQLState: 22001

SQL错误代码1406和SQLState 22001通常表示“列数据过长”错误。这意味着尝试插入或更新列中的值&#xff0c;但该值的长度超过了该列允许的最大长度。 解决此问题的几个步骤&#xff1a; 检查列长度&#xff1a; 确定引起错误的列。检查数据库架构中该列允许的最大长度。 验证…...

【密码学基础】基于LWE(Learning with Errors)的全同态加密方案

学习资源&#xff1a; 全同态加密I&#xff1a;理论与基础&#xff08;上海交通大学 郁昱老师&#xff09; 全同态加密II&#xff1a;全同态加密的理论与构造&#xff08;Xiang Xie老师&#xff09; 现在第二代&#xff08;如BGV和BFV&#xff09;和第三代全同态加密方案都是基…...

Linux - 基础开发工具(yum、vim、gcc、g++、make/Makefile、git)

目录 Linux软件包管理器 - yum Linux下安装软件的方式 认识yum 查找软件包 安装软件 如何实现本地机器和云服务器之间的文件互传 卸载软件 Linux编辑器 - vim vim的基本概念 vim下各模式的切换 vim命令模式各命令汇总 vim底行模式各命令汇总 vim的简单配置 Linux编译器 - gc…...

网络安全法律框架更新:最新合规要求与企业应对策略

网络安全法律框架的最新更新 近期&#xff0c;中国的网络安全法律框架经历了重要的更新。2022年&#xff0c;《网络安全法》迎来了首次修改&#xff0c;这一修订主要是为了与《数据安全法》和《个人信息保护法》等新实施的法律进行衔接协调&#xff0c;完善法律责任制度&#x…...

数仓工具—Hive语法之正则表达式函数

正则表达式函数 之前我们介绍过like rlike regexp 这些关键字,都是和匹配有关的,今天我们介绍一下hive 的REGEXP_REPLACE 和REGEXP_EXTRACT 函数,背景是使用Hive正则表达式函数提取数字 在我的其他文章中,我们已经看到了如何使用Hive正则表达式从字符串中提取日期值。正则…...

WKCTF 2024 easy_heap

很经典的house of orange unsortedbin attack FSOP 变量覆盖 不能 free&#xff0c;那首先想到就是 house of orange泄露Libc基址&#xff0c;然后unsortedbin attack。 但是只能show(8)&#xff0c;就不能用largebin的套路来泄露堆地址了&#xff0c;那怎么办呢&#xff1f; …...

SQL 多变关联使用子查询去重

不去重状态 select a.*,b.recon_amt from free_settlement_first aleft join free_settlement_second b on a.settlement_first_id b.settlement_first_id 有2条数据出现了重复 使用子查询去重 select a.*,b.recon_amt from free_settlement_first aleft join free_settlem…...

php表单提交并自动发送邮件给某个邮箱(示例源码下载)

只需要将以下代码内容进行复制即可用到自己的程序/API接口中&#xff1a; <?php if(!empty($_POST[is_post]) && $_POST[is_post]1){$url "https://www.aoksend.com/index/api/send_email";$name $_POST[name];$email $_POST[email];$subject $_POS…...

论文翻译:Large Language Models for Education: A Survey

目录 大型语言模型在教育领域的应用&#xff1a;一项综述摘要1 引言2. 教育中的LLM特征2.1. LLMs的特征2.2 教育的特征2.2.1 教育发展过程 低进入门槛。2.2.2. 对教师的影响2.2.3 教育挑战 2.3 LLMEdu的特征2.3.1 "LLMs 教育"的具体体现2.3.2 "LLMs 教育"…...

7.13实训日志

上午 学习网络安全的过程中&#xff0c;我们深入了解了网络的不同层面和技术&#xff0c;从表层网络到深网再到暗网&#xff0c;以及涉及的产业分类和技术工具。这些知识不仅帮助我们理解网络的复杂性&#xff0c;还揭示了如何应对和防范各种网络威胁。 首先&#xff0c;我们…...

【力扣】每日一题—第70题,爬楼梯

题目&#xff1a; 假设你正在爬楼梯。需要n阶你才能到达楼顶。 每次你可以爬1或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢&#xff1f; 思路&#xff1a; 我开始是写了一个函数计算爬一层和爬二层的个数&#xff0c;之后排列求和&#xff0c;但是超范围了&#xff0c…...

Docker修改国内镜像源

如果docker已将安装好 参考&#xff1a;https://github.com/cmliu/CF-Workers-docker.io sudo mkdir -p /etc/dockercd /etc/dockersudo vim daemon.json #输入以下内容 { "registry-mirrors": ["https://docker.fxxk.dedyn.io"] } #重启docker服务 su…...

安防监控视频平台LntonCVS视频融合共享平台智慧消防实现远程集中视频监控方案

近年来&#xff0c;电力系统内变电站着火事件频发&#xff0c;这对消防安全管理提出了严峻挑战。我国消防安全基础设施不完善、管理机制不健全、应急处置能力不足及公众消防安全意识淡薄等问题&#xff0c;严重制约了消防安全的提升。因此&#xff0c;加强变电站的消防安全管理…...

【大模型LLM面试合集】大语言模型架构_layer_normalization

2.layer_normalization 1.Normalization 1.1 Batch Norm 为什么要进行BN呢&#xff1f; 在深度神经网络训练的过程中&#xff0c;通常以输入网络的每一个mini-batch进行训练&#xff0c;这样每个batch具有不同的分布&#xff0c;使模型训练起来特别困难。Internal Covariat…...

OpenGL笔记八之EBO和EBO绘制流程

OpenGL笔记八之EBO和EBO绘制流程 —— 2024-07-07 晚上 bilibili赵新政老师的教程看后笔记 code review! 文章目录 OpenGL笔记八之EBO和EBO绘制流程1.EBO2.glDrawElements&#xff1a;如果使用了ebo&#xff0c;最后一个参数可以写03.glDrawElements&#xff1a;如果使用了e…...

maven——(重要)手动创建,构建项目

创建项目 手动按照maven层级建好文件夹&#xff0c;并写上java&#xff0c;测试代码和pom文件 构建项目 在dos窗口中执行如下命令 compile编译 当前maven仓库中什么都没有。 在pom所在层级下&#xff0c;执行&#xff1a; mvn compile 就开始显示下面这些&#xff0c;…...

数学建模·非线性规划

整型规划 适用于一个变量或多个变量的值只能是整型的情况 整形规划的分类 0-1背包问题 对于一个物品来说&#xff0c;只有选和不选两种情况 表现为单下标&#xff0c;单变量问题 例&#xff1a;建设学校问题 对于每个学校来说只有选和不选两种情况&#xff0c;在数学上我们用…...

SpringCloud第三篇(服务中心与OpenFeign)

p 文章目录 一、服务中心二、Nacos注册中心 一、服务中心 在上一章我们实现了微服务拆分&#xff0c;并且通过Http请求实现了跨微服务的远程调用。不过这种手动发送Http请求的方式存在一些问题。 试想一下&#xff0c;假如商品微服务被调用较多&#xff0c;为了应对更高的并发…...