#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#define mp make_pair
#define f first
#define s second
using namespace std;
const int MXN=1e6+5;
int n,a;
int tab[MXN];
int main() {
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d",&a);
tab[i]=a;
}
sort(tab,tab+n);
int odp=0;
if(tab[0]>1){
odp++;
}
if(tab[1]>1){
odp++;
}
printf("%d\n",odp);
printf("2\n");
printf("1 2\n");
return 0;
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #include <iostream> #include <cstdio> #include <cmath> #include <algorithm> #include <utility> #include <vector> #define mp make_pair #define f first #define s second using namespace std; const int MXN=1e6+5; int n,a; int tab[MXN]; int main() { scanf("%d",&n); for(int i=0;i<n;i++){ scanf("%d",&a); tab[i]=a; } sort(tab,tab+n); int odp=0; if(tab[0]>1){ odp++; } if(tab[1]>1){ odp++; } printf("%d\n",odp); printf("2\n"); printf("1 2\n"); return 0; } |
English