rk288,比前几次差(可能是因为rated?)
A 十年OI一场空,不开long long见祖宗
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int n;
cin>>n;
cout<<"8 "<<12*(n-2)<<" "<<6*(n-2)*(n-2);
return 0;
}
打完A去吃了个饭,回来都7点半了(祭)
B
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,a,b,c,ans;
cin>>n>>a>>b>>c;
if(n<=3)
{
if(a<min(b,c))
{
ans=a;
}
else
{
if(b<min(a,c))
{
ans=b;
}
else
{
ans=c;
}
}
}
else
{
if(n<=5)
{
if(b<c)
{
ans=b;
}
else
{
ans=c;
}
}
else
{
if(n<=9)
{
ans=c;
}
}
}
if(ans==a)
{
cout<<"library";
}
if(ans==b)
{
cout<<"comprehensive";
}
if(ans==c)
{
cout<<"art";
}
return 0;
}
C 十年OI一场空,不开long long见祖宗
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int n,x,i,ans,a;
cin>>n>>x;
ans=n*x;
for(i=1;i<=n;i++)
{
cin>>a;
ans+=a;
}
cout<<ans;
return 0;
}
D 忘记了对s2==0的特判,以为卡long long,然后就用上了int128,20min没了(祭)
#include<bits/stdc++.h>
using namespace std;
#define ll __int128_t
ll read()
{
ll x=0,f=1;
char c=getchar();
while(c>'9'||c<'0')
{
if(c=='-')
{
f=-1;
}
c=getchar();
}
while('0'<=c&&c<='9')
{
x=x*10+c-'0';
c=getchar();
}
return x*f;
}
void write(ll x)
{
if(x<0)
{
putchar('-');
x=-x;
}
if(x>9)
{
write(x/10);
}
putchar((x%10)+'0');
}
int main()
{
ll n,m,i,ans=0,a,b,c,s1,s2;
n=read();
m=read();
for(i=1;i<=n;i++)
{
a=read();
b=read();
c=read();
ans+=(a*b*c);
}
s1=ans/m;
s2=ans%m;
if(s2!=0)
{
s1++;
}
write(s1);
cout<<" ";
if(s2==0)//一定要特判,别想起来上边的不记得这个
{
write(m);
}
else
{
write(s2);
}
return 0;
}
E 关于我把a b写反了这件事,调了40min(警钟长鸣)
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int n,x,y,a,b,S,s,m,i,sum=0,num=0,ans1=0,ans2=0;
cin>>n>>x>>y>>a>>b;
for(i=1;i<=n;i++)
{
cin>>S>>s>>m;
if(S*x+s*y==m)
{
num=0;
sum++;
if(sum>=b)
{
ans2/=2;
}
ans1=max(ans1,ans2);
}
if(S*x+s*y<m)
{
sum=0;
num++;
ans2+=(m-S*x-s*y);
if(m-S*x-s*y>S*x+s*y)
{
ans2+=(m-S*x-s*y)/2;
if((m-S*x-s*y)%2==1)
{
ans2++;
}
}
if(num>=a)
{
ans2*=2;
}
ans1=max(ans1,ans2);
}
}
cout<<ans1<<" "<<ans2;
return 0;
}
F 看起来很难的样子,没写
G 看起来很难的样子,没写
H 看起来很难的样子,没写
I 还行,一开始想把它整RE,结果忘记了luogu检测不出来RE(总结,极限数据是个好东西)
#include <iostream>
using namespace std;
int main() {
int taskId;
cin >> taskId;
if (taskId == 1) {
cout << "99 1 99" <<endl;
} else if (taskId == 2) {
cout<<"200000\n";
for(int i=1;i<=200000;i++)
{
cout<<"std::cerr"<<endl;
}
}
}
I 彩蛋:我是谁,我在哪里
感觉稍微有点思维难度的就做不出来了,whk考试的习惯(发慌)又双叒叕延续到OI上来了。
标签:std,13,洛谷,int,ans2,long,LGR,using,include From: https://www.cnblogs.com/The-Shadow-Dragon/p/17470330.html