我的马蜂真的很AI吗???
2026-07-01 16:07:22
发布于:浙江

我的马蜂真的很AI吗???
难道你们不加空格吗???
放代码
#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
long long h[N],a[N],b[N];
int main()
{
long long n,s,L;
cin >> n >> s >> L;
for(long long i = 1;i <= n;i++)
{
cin >> h[i];
}
for(long long i = 1;i <= n;i++)
{
cin >> a[i];
}
if(n == 1)
{
cout << (s-h[1])/a[1];
return 0;
}
long long ans = 1e18;
long long l = 0,r = 1e18;
while(l <= r)
{
long long mid = (l+r)/2;
for(long long i = 1;i <= n;i++)
{
long long now = h[i] + 1LL * a[i] * mid;
b[i] = now;
}
unsigned long long sum = 0;
sort(b+1,b+n+1);
for(int i = n;i >= 1;i--)
{
if(b[i] < L)
{
break;
}
sum += b[i];
if(sum >= s)
{
break;
}
}
if(sum >= s)
{
ans= min(ans,mid);
r = mid-1;
}
else l = mid + 1;
}
cout << ans;
}
#include <iostream>
using namespace std;
const int N = 30;
int sx,sy;
int ex,ey;
char a[N][N];
bool vis[N][N];
int n,m;
int ans = 1e9;
int dx[4] = {1,-1,0,0};
int dy[4] = {0,0,1,-1};
void dfs(int x,int y,int t)
{
if(x == ex&&y == ey)
{
ans = min(ans,t);
return ;
}
for(int i = 0;i < 4;i++)
{
int nx = x + dx[i];
int ny = y + dy[i];
if(a[nx][ny] =='W')
{
dfs(nx,ny,t+1);
}
if(ny >= 1&&ny <= m&&nx >= 1&&nx <= n&&vis[nx][ny] == 0&&a[nx][ny] == '.')
{
vis[nx][ny] = 1;
dfs(nx,ny,t+1);
vis[nx][ny] = 0;
}
if(ny >= 1&&ny <= m&&nx >= 1&&nx <= m&&vis[nx][ny] == 0&&a[nx][ny] >= '0'&&a[nx][ny] <= '9')
{
vis[nx][ny] = 1;
dfs(nx,ny,t+1+(a[nx][ny] - '0'));
vis[nx][ny] = 0;
}
}
}
int main()
{
cin >> n >> m;
for(int i = 1;i <= n;i++)
{
for(int j = 1;j <= m;j++)
{
cin >> a[i][j];
if(a[i][j] == 'Z')
{
sx = i;
sy = j;
}
if(a[i][j] == 'W')
{
ex = i;
ey = j;
}
}
}
vis[sx][sy] = 1;
dfs(sx,sy,0);
if(ans != 1e9) cout << ans;
else cout << "IMPOSSIBLE";
}
告诉我
全部评论 81
我的码风:
#include <bits.stdc++.h> using namespace std ; int x , y , z , u , w , v ; int main () { cin >> x >> y >> z ; u = 1 ; if ( 1 == u )cout << "NI HAO XIANG YI GE REN" ; int * p ; return 0 ; }2026-06-23 来自 浙江
20空格非常多非常多
好心人点点赞2026-06-23 来自 浙江
15同道中人啊
2026-06-23 来自 浙江
9ai
int a, b;2026-06-24 来自 浙江
6
我一般不加空格,但我周边好多人确实加空格
mine:#include <iostream> using namespace std; int main(){ cout<<"Hello world!"; return 0; }2026-06-23 来自 浙江
8还有你不会被巅峰赛判AI了吧
2026-06-23 来自 浙江
1+1
2026-06-24 来自 浙江
1不会判
2026-06-24 来自 浙江
0
#include<bits/stdc++.h> using namespace std; int n,m,a[100000005],st[100000005],idx; void f(int s){ st[1]=1; for(int i=2;i<=s;i++){ if(!st[i]){ a[++idx]=i; } for(int j=1;a[j]*i<=s;j++){ st[a[j]*i]=1; if(i%a[j]==0){ break; } } } } int main(){ f(100000000); cin>>n>>m; for(int i=1;i<=m;i++){ int x; cin>>x; cout<<a[x]<<endl; } }问了吗,Stars_Seeker 的万年不变老僵尸码风,从我第一次写 Hello World 的时候就是这个()
2026-06-27 来自 重庆
4没我的AI
2026-06-20 来自 广东
3确实
2026-06-24 来自 天津
0我想试试在洛谷月赛用你的码风,看看什么情况

2026-06-27 来自 重庆
1我打过一堆比赛了,毛事没有
2026-06-27 来自 广东
0
我的马蜂:
#include<bits/stdc++.h> using namespace std;//注释时常鬼畜且无意义 int main(){ cout<<"Hello world!";//休闲娱乐来一个 return 0;//我要验牌 }2026-06-27 来自 江苏
2够休闲
2026-06-27 来自 山东
2
mine:
#include <iostream> using namespace std; int main() { int a,b; cin >> a >> b; if(a > b) { cout << "Well down!" << endl; } else { cout << "Oh sh*t!" << endl; } return 0;2026-06-25 来自 山东
2我几乎不加空格。
2026-06-20 来自 浙江
2我是只有&&和||加空格
2026-06-20 来自 浙江
2me too!
2026-06-25 来自 浙江
0我都不加空格
2026-06-27 来自 上海
1+1
2026-06-30 来自 福建
0
豆包的徒弟(不加注释版)
1周前 来自 山西
1int a;
2026-06-30 来自 江苏
1int a ;
2026-06-30 来自 江苏
1#include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; for(int i=n;i<=m;i++){ if(floor(sqrt(i))*floor(sqrt(i))==i){ for(int i3=10;i3<=i;i3*=10){ if(floor(sqrt(i%i3))*floor(sqrt(i%i3))==i%i3&&floor(sqrt(i/i3))*floor(sqrt(i/i3))==i/i3&&i%i3!=0&&i/i3!=0){ cout<<i<<endl; break; } } } } return 0; }挤成一团的马蜂
2026-06-28 来自 江苏
1附:马蜂:
马蜂(学名胡蜂)是膜翅目胡蜂科昆虫的统称,别称黄蜂、蚂蜂,体型中到大型,体色多为黑、黄、棕三色相间,腹部末端有毒腺和螯针,遇威胁会群起攻击,其毒液可引发过敏休克甚至死亡。
关键点:
1.习性:社会性昆虫,蜂群由蜂后、工蜂、雄蜂组成;杂食性,捕食昆虫幼虫,也吸食花蜜;营巢于隐蔽处,巢为纸质吊钟状或层状。
2.危险性:被蛰后易红肿、疼痛,过敏者可能休克;误触蜂巢会遭追袭,可直追百米。
3与蜜蜂区别:马蜂巢为纸质,攻击性强;蜜蜂巢为蜡质,性情较温顺
。4.药用价值:成虫、幼虫及蜂巢可入药,用于治疗风湿痛等,蜂毒用于医学研究。
提示:夏秋季活动频繁,勿自行处理蜂巢,被蛰后需及时就医。
2026-06-28 来自 江苏
2
只有我的码风如此工整吗:
#include<bits/stdc++.h> using namespace std; long long n,x,l[55],p[55]; long long cnt(long long n,long long x) { if(n==0) { return 1; } if(x==1) { return 0; } if(x>=2&&x<=1+l[n-1]) { return cnt(n-1,x-1); } if(x==1+l[n-1]+1) { return 1+p[n-1]; } if(x>=1+l[n-1]+1+1&&x<=l[n]-1) { return 1+p[n-1]+cnt(n-1,x-1-l[n-1]-1); } if(x==l[n]) { return 1+p[n-1]+p[n-1]; } } int main() { cin>>n>>x; l[0]=1,p[0]=1; for(int i=1;i<=n;i++) { l[i]=1+l[i-1]+1+l[i-1]+1; p[i]=1+p[i-1]+p[i-1]; } cout<<cnt(n,x); return 0; }2026-06-27 来自 江苏
1而且必开long long
2026-06-27 来自 江苏
2
我加空格还有条件

#include <bits/stdc++.h> using namespace std; int main() { int n,m,a[1005][1005];cin >> n >> m; for (int i = 1;i <= n;i++){ for (int j = 1;j <= m;j++){ cin >> a[i][j]; } } int x,y,c,d,sum = 0;cin >> x >> y >> c >> d; for (int i = x;i <= c;i++){ for (int j = y;j <= d;j++){ sum += a[i][j]; } } cout << sum; return 0; }2026-06-24 来自 江苏
1我也是
2026-06-25 来自 浙江
0
我去居然上榜了

2026-06-24 来自 天津
1周深今天有演唱会吗

2026-06-24 来自 江苏
0
2026-06-24 来自 浙江
1我哪知道
2026-06-24 来自 天津
0
d
2026-06-20 来自 浙江
1d
2026-06-20 来自 浙江
1d
2026-06-20 来自 浙江
0d
1周前 来自 浙江
0
是很AI,我的码风和你一样,就是我的 {} 在for循环后面,例如for(int i = 1; i <= n; i++) {……}
2026-06-20 来自 浙江
1我也是
2026-06-23 来自 浙江
0+1
2026-06-24 来自 广东
0+100
2026-06-24 来自 浙江
0
你的码风其实是很标准的,不过有些细节,是啥我不知道
2026-06-19 来自 福建
1我同学说我代码空格太多了


老师一放代码下面就一群“啊”2026-06-20 来自 浙江
0
#include <iostream> using namespace std; int main(){ int h=2200,g=4396; cout <<g+h << endl; cout <<g-h << endl; cout <<g*h << endl; cout <<g/h << endl; cout <<g%h ; return 0; }2026-06-18 来自 浙江
1确实基本不加空格,就拿我在洛谷做的唯一一道紫题说话吧(只不过没用后缀排序用的Hash):
#include<bits/stdc++.h> using namespace std; #define ui unsigned #define mx 1000005 #define bs 97 #define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); ui fac[mx]={1},hs[mx]; int n,s[mx]; char c[mx]; ui get(int l,int r){ if(l!=0) return hs[r]-hs[l-1]*fac[r-l+1]; return hs[r]; } bool cmp(int a,int b){ int l=0,r=min(n-a,n-b); while(l<r){ int mid=(l+r+1)/2; if(get(a,a+mid-1)==get(b,b+mid-1)) l=mid; else r=mid-1; } if(a+l==n || b+l==n) return a>b; return c[a+l]<c[b+l]; } int main(){ io; cin>>c; n=strlen(c); for(int i=1;i<=n;i++) fac[i]=fac[i-1]*bs; hs[0]=c[0]+1; for(int i=1;i<n;i++) hs[i]=hs[i-1]*bs+c[i]+1; for(int i=0;i<n;i++) s[i]=i; stable_sort(s,s+n,cmp); for(int i=0;i<n;i++) cout<<s[i]+1<<' '; }2026-06-18 来自 浙江
1自然溢出哈希?这能过?
2026-06-20 来自 广东
1只能说数据没把这个卡掉
2026-06-21 来自 浙江
0牛逼,神秘数据
2026-06-21 来自 广东
0













































































有帮助,赞一个