Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
3508 | OscarWLY | 黑白精灵 | C++ | Wrong Answer | 0 MS | 248 KB | 257 | 2023-01-08 17:13:11 |
#include<iostream> using namespace std; int main() { int n,m; cin>>n>>m; int n1,m1,n2,m2; int ans=0; cin>>n1>>m1>>n2>>m2; ans=n+m-2; ans=min(ans,(n1+m1-2)+(n+m-n2-m2)); ans=min(ans,(n2+m2-2)+(n+m-n1-m1)); cout<<ans<<endl; return 0; }