3月12
1、
#include <iostream>
#include <cmath>
using namespace std;
bool isPrimer(int n)
{
for(int i=2;i<=sqrt(n);i++){
if(n%i == 0){
return 0;
}
}
return 1;
}
int main()
{
int s=0,n=1;
while(s!= 100002){
n++;
if(isPrimer(n)){
s++;
}
}
cout << n << endl;
return 0;
}
2、

#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N=1e8+10;
int num[10]={1,2,3,4,5,6,7,8,9,10};
bool check(int num[10]){
for(int i=1;i<10;i++){
if(abs(num[i]-num[i-1])==1) return false;
}
return true;
}
int main()
{
int ans=0;
do{
if(check(num)) ans++;
}while(next_permutation(num,num+10));
cout<<ans;
return 0;
}
3、
include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define x first
#define y second
const int N = 100010;
int cnt[N];
bool st[N];//记录每个帖子是否曾经是热帖
typedef pair<int, int > PII;
PII logs[N];
int main ()
{
int n, d, k;
scanf("%d%d%d", &n, &d, &k);
for(int i = 0; i < n; i++) scanf("%d%d", &logs[i].x, &logs[i].y);
sort(logs, logs + n);//记录完,然后时间排序
for(int i = 0, j = 0; i < n; i++)
{
int id = logs[i].y;
cnt[id] ++;
while(logs[i].x - logs[j].x >= d)
{
cnt[logs[j].y] --;
j++;
}
if(cnt[id] >= k) st[id] = true;
}
for(int i = 0; i < 100000; i++)
if(st[i]) cout << i << endl;
return 0;
}
...全文
相关推荐
绿色环保主题-3月12日植树节PPT模板.pptx
【绿色环保主题】与【3月12日植树节】PPT模板相关知识点:1. **绿色环保理念**:在设计PPT模板时,绿色环保主题强调的是生态平衡、可持续发展和资源节约。
全球财经资讯日报(日间)2026年03月12日
本报告聚焦2026年3月12日全球金融市场动态,揭示复苏周期下避险主导、滞胀担忧加剧与地缘风险推升通胀的核心特征。重点涵盖股市普跌、债市收益率上行、大宗商品强势领涨、美元稳健及人民币锚定效应,并结合AI热点(热度604)、量化配置策略(高现金+超配商品/衍生品+低配权益/固收)与风控指标(VaR<0.8%,夏普10.54)进行智能化资产研判。
3月12日 工作记录 DeepSeek-VL阅读笔记
文章介绍了DeepSeek-VL的项目,重点在于其多样化的预训练数据集,包括图像、文本、表格、图表等,以及通过混合视觉编码器实现的高效模型架构。研究者发现平衡多模态和语言能力至关重要,最终通过监督微调优化了模型,以提升交互式对话体验。
3月12日 二次剩余(shanks解法)
本文介绍了二次剩余的Shanks解法,相对于Cipolla算法,它更偏向数论。虽然理解难度较高,但该算法在解决特定问题时仍具价值。
3月12日植树节国旗下讲话.docx
3月12日植树节国旗下讲话.docx


