版本比较
题解:P14101 [ZJCPC 2017] Problem Preparation
正文
增加 3 行删除 3 行
9 行未改动1011121314151617185 行未改动24252627282930313233343536373839404119 行未改动9 行未改动# 题目思路模拟。依次判断这些条件是否满足,若有不满足的条件输出```No```,若都满足则输出```Yes```。不要忘了这道题目有多组测试数据。### [AC](https://www.luogu.com.cn/record/237604323) Code:```cpp5 行未改动while(T--){scanf("%d",&n);int ma=-1010;int a[n+2];for(int i=1;i<=n;i++){scanf("%d",&a[i]);ma=max(ma,a[i]);}if(n<10||n>13){printf("No\n");//如果数字个数不符合要求,输出No,并直接跳出此次循环continue;}sort(a+1,a+n+1);if(!(a[1]==1&&a[2]==1)){printf("No\n");//如果最小数字不是1,或者只有一个数字1输出No,并直接跳出此次循环continue;19 行未改动9 行未改动1011121314151617185 行未改动24252627282930313233343536373839404119 行未改动9 行未改动# 题目思路模拟。依次判断这些条件是否满足,若有不满足的条件输出```No```,若都满足则输出```Yes```。不要忘了这道题目有多组测试数据。### [AC](https://www.luogu.com.cn/record/237604323) Code:```cpp5 行未改动while(T--){scanf("%d",&n);int ma=-1010;int a[n+2];for(int i=1;i<=n;i++){scanf("%d",&a[i]);ma=max(ma,a[i]);}if(n<10||n>13){printf("No\n");//如果数字个数不符合要求,输出No,并直接跳出此次循环continue;}sort(a+1,a+n+1);if(!(a[1]==1&&a[2]==1)){printf("No\n");//如果最小数字不是1,或者只有一个数字1输出No,并直接跳出此次循环continue;19 行未改动