This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long lo; 
#define fi first
#define se second
#define endl "\n"
#define pb push_back
#define int long long
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(int i=1;i<=n;i++)
#define mid ((start+end)/2)
#define ort ((bas+son)/2)
#define _ << " " <<
const lo inf = 1000000000;
const lo li = 500005;
const lo mod = 1000000007;
int n,m,a[li],k,flag,t;
int cev;
string s,ss;
vector<int> v;
inline int fark(int x,int y){
	if(x>y)return 26-x+y;
	return y-x;
}
inline char ekle(int x,int y){
	x+=y;
	if(x>'z')x-=26;
	return x;
}
int32_t main(void){
	fio();
	cin>>n>>k;
	cin>>s>>ss;
	for(int i=0;i<n-1;i++){
		int at=fark(s[i],ss[i]);
		s[i]=ekle(s[i],at);
		s[i+1]=ekle(s[i+1],at);
	}
	if(s[n-1]==ss[n-1])cout<<"da\n";
	else cout<<"ne\n";
	return 0;
}
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |