Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #include <iostream>
- #include <conio.h>
- #include <string>
- #include <algorithm>
- #include <vector>
- #include <map>
- #include <queue>
- #include <set>
- #include <stack>
- using namespace std;
- typedef long long ll;
- int main()
- {
- ll n;
- cin >> n;
- for (int i = 1; i <= n; i++)
- {
- ll prom;
- cin >> prom;
- if (prom == 1)
- {
- cout << i << " " << i;
- return 0;
- }
- }
- cout << -1;
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment