连着两场。。。

[考试反思]1112csp-s模拟测试112:二返

信心赛。但是题锅了,我也锅了。

然后Day2就不用考了。

T1没开够long long。(a+b+c+0ll)与(0ll+a+b+c)还是有一点区别的。

T2出题人用Windows出数据锅了一片(换行符是\r)

T3少写了一个等号-5pts问题不大

然后居然WAK了。其实并不是,还是A了一个的。。。

我把普通平衡树A了

 

T1:装饰

尽量少浪费。

 1 #include<cstdio>
 2 int main(){
 3     freopen("decorate.in","r",stdin);freopen("decorate.out","w",stdout);
 4     int t;scanf("%d",&t);
 5     while(t--){
 6         int a,b,c;scanf("%d%d%d",&a,&b,&c);
 7         if(b>a)a^=b^=a^=b;
 8         if(c>a)c^=a^=c^=a;
 9         if(a>b+c+0ll<<1)a=b+c<<1;
10         printf("%lld\n",(0ll+a+b+c)/3);
11     }
12 }
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案