#include <bits/stdc++.h> using namespace std; int main() { int n,x,s=0; scanf("%d",&n); while(n--) scanf("%d",&x),s+=(x==1); printf("%d\n2\n1 2\n",max(2-s,0)); }
1 2 3 4 5 6 7 8 9 | #include <bits/stdc++.h> using namespace std; int main() { int n,x,s=0; scanf("%d",&n); while(n--) scanf("%d",&x),s+=(x==1); printf("%d\n2\n1 2\n",max(2-s,0)); } |