Submission #968369

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9683692024-04-23 11:05:17IsamSuperpozicija (COCI22_superpozicija)C++17
30 / 110
25 ms5944 KiB
#include<bits/stdc++.h>
using namespace std;
int n, l[100002], r[100002];
string z;
int ans[100002];
int gr[200002];
set<pair<int, int>> st;
signed main(){
ios_base::sync_with_stdio(0), cin.tie(0);
int T;
cin >> T;
function<void()> test_case = [](){
cin >> n >> z;
st.clear();
z = '.' + z;
for(register int i = 1; i <= n; ++i){
cin >> l[i] >> r[i];
gr[l[i]] = r[i];
gr[r[i]] = l[i];
if(z[l[i]] == '(' && z[r[i]] == '('){
ans[i] = 0;
z[r[i]] = '.';
}else if(z[l[i]] == ')' && z[r[i]] == ')'){
ans[i] = 1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Main.cpp: In lambda function:
Main.cpp:22:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   22 |   for(register int i = 1; i <= n; ++i){
      |                    ^
Main.cpp:47:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   47 |   for(register int i = 1; i <= 2*n; ++i){
      |                    ^
Main.cpp: In lambda function:
Main.cpp:73:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   73 |    for(register int i = 0; i < (int)s.size(); ++i){
      |                     ^
Main.cpp: In lambda function:
Main.cpp:83:20: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   83 |   for(register int i = 1; i <= 2*n; ++i){
      |                    ^
Main.cpp:89:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   89 |    for(register int i = 1; i <= n; ++i) cout << ans[i] << ' ';
      |                     ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...