-
Notifications
You must be signed in to change notification settings - Fork 0
/
763-a.cpp
51 lines (47 loc) · 822 Bytes
/
763-a.cpp
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include <iostream>
#include <iomanip>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <sstream>
#include <fstream>
#include <functional>
#include <array>
#include <climits>
//#include "debug.h"
using namespace std;
#define A first
#define B second
typedef long long ll;
constexpr int MOD = 1e9 + 7;
void solve(){
int N;
cin >> N;
string S;
cin >> S;
for(int i = 0; i < N - 1; i++) {
if(S[i] != S[i + 1]) {
cout << i + 1 << ' ' << i + 2 << '\n';
return;
}
}
cout << -1 << ' ' << -1 << '\n';
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int T;
T = 1;
cin >> T;
while(T--){
solve();
}
}