#include <cstdio> int main() { int n, x, cnt = 0; scanf( "%d", &n ); while ( n-- ) { scanf( "%d", &x ); if ( x == 1 && ++cnt == 2 ) break; } printf( "%d\n2\n1 2\n", 2-cnt ); }
1 2 3 4 5 6 7 8 9 10 11 12 | #include <cstdio> int main() { int n, x, cnt = 0; scanf( "%d", &n ); while ( n-- ) { scanf( "%d", &x ); if ( x == 1 && ++cnt == 2 ) break; } printf( "%d\n2\n1 2\n", 2-cnt ); } |