// eeeee? #include <cstdio> #include <algorithm> using namespace std; int main() { int ones = 0; int n; int tmp; scanf("%d", &n); for (int i = 0 ; i < n; i++) { scanf("%d", &tmp); if (tmp == 1) ones++; } printf("%d\n2\n1 2\n", max(0, 2 - ones)); }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | // eeeee? #include <cstdio> #include <algorithm> using namespace std; int main() { int ones = 0; int n; int tmp; scanf("%d", &n); for (int i = 0 ; i < n; i++) { scanf("%d", &tmp); if (tmp == 1) ones++; } printf("%d\n2\n1 2\n", max(0, 2 - ones)); } |