# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1026456 | 2024-07-18T06:17:49 Z | vjudge1 | Bliskost (COI23_bliskost) | C++17 | 0 ms | 600 KB |
#include <bits/stdc++.h> using namespace std; #define int long long void f(){ #ifndef ONLINE_JUDGE freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout); #endif } signed main(){ ios_base::sync_with_stdio(false); cin.tie(0); //f(); int n, q; cin >>n >> q; vector<int> a(n); int sb=0, sa=0; string s, t; cin >> s>> t; for(int i=0; i<n; i++){ if((s[i]-'a')%2) sa++, a[i]=1; if((t[i]-'a')%2) sb++; } if(sa%2!=sb%2) cout<<"ne"<<"\n"; else cout<<"da"<<"\n"; while(q--){ int p; cin >> p; p--; char x; cin >> x; x--; x-='a'; if(x%2!=a[p]){ sa++; a[p]^=1; } if(sa%2!=sb%2) cout<<"ne"<<"\n"; else cout<<"da"<<"\n"; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Incorrect | 0 ms | 344 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Incorrect | 0 ms | 344 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Incorrect | 0 ms | 344 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Incorrect | 0 ms | 344 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Incorrect | 0 ms | 344 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 600 KB | Output is correct |
2 | Incorrect | 0 ms | 344 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |