|
|
回复 @yrtiop :
题目 3616 [CSP 2021J]插入排序
2025-07-28 19:25:14
|
|
|
普及组的剑也未必不利!
题目 1444 [NOIP 2013]车站分级
2025-07-27 19:32:09
|
|
|
|
|
|
#include<bits/stdc++.h>
using namespace std; int n; void scrt(int a[],int x) {for(int i=1;i<=n;i++) for(int j=i;j>=2;j--) {if(a[j]<a[j-1]) {if(x==j) x--; else x++; swap(a[j],a[j-1]); } }cout<<x<<endl;return; } int main() {int q,s,x,y,a[8001]={},b[8001]; cin>>n>>q; for(int i=1;i<=n;i++) {cin>>a[i];b[i]=a[i];} while(q--) {cin>>s; if(s==1) {cin>>x>>y; a[x]=y;b[x]=y;} else {cin>>x; scrt(a,x); for(int i=1;i<=n;i++) {a[i]=b[i];} } } return 0;}
题目 3616 [CSP 2021J]插入排序
2025-07-23 20:02:56
|
|
|
题目 3778 [CSP 2022J]解密
2025-07-23 19:21:40
|
|
|
cout<<"/"<<2*a/t;
cout<<endl; } } return 0; }
题目 3929 [CSP 2023J]一元二次方程
2025-07-20 20:02:18
|
|
|
y)==0)
{ k*=y; d/=(y*y); } if(d==0||d==1) { t=abs(god(2*a,-b+k*d)); cout<<(-b+k*d)/t; if(2*a/t != 1) cout<<"/"<<2*a/t; cout<<endl; continue; } g: t=abs(god(-b,2*a)); if(-b/t==0) goto g; cout<<-b/t; if(2*a/t != 1) cout<<"/"<<2*a/t; cout<<"+"; t=abs(god(k,2*a)); if(k/t != 1) cout<<k/t<<"*"; cout<<"sqrt("<<d<<")"; if(2*a/t != 1)
题目 3929 [CSP 2023J]一元二次方程
2025-07-20 20:02:03
|
|
|
int t,m,a,b,c,d,q1,q2,q3,r,x,y,zi,mu;
cin>>t>>m; for(int i=1;i<=t;i++) {cin>>a>>b>>c; if(a<0) {a=-a; b=-b; c=-c; } d=b*b-4*a*c;mu=2*a; if(d<0) cout<<"NO"; else if(d>=0) {q2=iff(d); if(q2*q2==d) {zi=-b+q2; zi=zi/gcd(
题目 3929 [CSP 2023J]一元二次方程
2025-07-20 20:01:56
|
|
|
#include<bits/stdc++.h>
using namespace std; int gcd(int x,int y){ if(y == 0)return x; x = abs(x),y = abs(y); return gcd(y,x%y); } int iff(int d) {int i=1,an; for(i=1;i<=d;i++) {if(d%(i*i)==0) an=i; } return i; } int main(){ freopen("uqe.in","r",stdin); freopen("uqe.out","w",stdout);
题目 3929 [CSP 2023J]一元二次方程
2025-07-20 20:01:37
|
|
|
#include<bits/stdc++.h>
using namespace std; int god(int a,int b) { if(b==0) return a; else return god(b,a%b); } int main() { freopen("uqe.in","r",stdin); freopen("uqe.out","w",stdout); int T, M; cin >> T >> M; while (T--) { int a, b, c; cin >> a >> b >> c; int d=b*b-4*a*c; if(d<0) cout<<"NO"; else {int p,q; //★★☆ if(a>0) { a=-a; b=-b; c=-c; } int k=1,t; for(int y=2;y*y<=d;y++) while(d%(y*
题目 3929 [CSP 2023J]一元二次方程
2025-07-20 20:01:31
|
|
|
炸了
|
|
|
暂时有
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() (bgm7
题目 3929 [CSP 2023J]一元二次方程
2025-07-20 19:48:37
|
|
|
66666666
|
|
|
#include<bits/stdc++.h>
using namespace std; int main() { freopen("uqe.in","r",stdin); freopen("uqe.out","w",stdout); int T, M; cin >> T >> M; while (T--) { int a, b, c; cin >> a >> b >> c; int d=b*b-4*a*c; if(d<0) cout<<"NO"; else {int p,q; //★★☆ } } return 0; }
题目 3929 [CSP 2023J]一元二次方程
2025-07-18 20:02:09
|
|
|
#include<cstdio>
#include<iostream> using namespace std; long long n,d,v[114514],a[114514],cheap=11451419,fuel=0,money=0; int main(){ freopen("road.in","r",stdin); freopen("road.out","w",stdout); cin>>n>>d; for(int q=1;q<n;++q){ cin>>v[q]; } for(int w=1;w<=n;++w){ cin>>a[w]; } for(int e=1;e<n;++e){ if(a[e]<cheap) cheap=a[e]; while(fuel<v[e]){ fuel+=d; money+=cheap; } fuel-=v[e]; } cout<<money; |
|
|
#include<bits/stdc++.h>
using namespace std; int main() { freopen("apple.in","r",stdin); freopen("apple.out","w",stdout); long long int n,date=0,ans[10000],i=0; cin>>n; while(n>0) { date++; if(n%3==1) { i++; ans[i]=date; } n=n-ceil(n*1.0/3); } cout<<date<<" "<<ans[1]; fclose(stdin);fclose(stdout); return 0; }
题目 3927 [CSP 2023J]小苹果
2025-07-18 19:16:20
|
|
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() (
题目 3927 [CSP 2023J]小苹果
2025-07-18 19:14:11
|
|
|
回复 @father : 11111111111111155555555555555
题目 3927 [CSP 2023J]小苹果
2025-07-18 19:13:18
|
|
|
22
题目 3927 [CSP 2023J]小苹果
2025-07-18 19:07:59
|
|
|
原大小:,缩放到宽度:。
表情暂时有 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() (bgm
题目 3927 [CSP 2023J]小苹果
2025-07-18 19:07:48
|