A.Eating Soup

考虑多个点连成多边形,每一条边就是一个部分,若m>n/2则取n-m

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
 1 #include <bits/stdc++.h>
 2 using namespace std;
 3 
 4 int n, m, ans;
 5 int main(){
 6     ios::sync_with_stdio(0);
 7     cin.tie(0);
 8     cout.tie(0);
 9     if( m==0 ) ans = 1;
10     else ans = min( m, n-m );
11     cout << ans << endl;
12 
13     return 0;
14 }

 其他题待补。。。

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄