1990 工作分配
不知道scanf,printf为什么不对,呜呜呜~~~;--主要是评测机ll与电脑I64d的区别,害我调了半天。
#include<cstdio> #include<iostream> using namespace std; int main() { long long a,b,c,d,e,f,g,h,i,ans=3; cin>>a>>b>>c>>d>>e>>f>>g>>h>>i; //scanf("%lld%lld%lld%lld%lld%lld%lld%lld%lld",&a,&b,&c,&d,&e,&f,&g,&h,&i); long long t1=a+e+i;ans=max(ans,t1); long long t2=a+f+h;ans=max(ans,t2); long long t3=b+d+i;ans=max(ans,t3); long long t4=b+f+g;ans=max(ans,t4); long long t5=c+e+g;ans=max(ans,t5); long long t6=c+d+h;ans=max(ans,t6); //printf("%lld\n",ans); cout<<ans; return 0; }