| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1060006 | aymanrs | Bliskost (COI23_bliskost) | C++17 | 132 ms | 24300 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
void solve(){
int n, q;cin >> n >> q;
string s, t;cin >> s >> t;
int aemo = 0, bemo = 0;
int a[n],b[n];for(int i = 0;i < n;i++){
a[i]=s[i]-'a';
b[i]=t[i]-'a';
if(i&1) aemo += 26-a[i];
else aemo += a[i];
if(i&1) bemo += 26-b[i];
else bemo += b[i];
}
if(aemo%26 == bemo%26) cout << "da\n";
else cout << "ne\n";
while(q--){
int p;char c;cin >> p >> c;
p--;c -= 'a';
if(p&1){
aemo -= 26-a[p];
aemo += 26-c;
} else {
aemo -= a[p];
aemo += c;
}
a[p]=c;
if(aemo%26 == bemo%26) cout << "da\n";
else cout << "ne\n";
}
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
solve();
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
