Submission #1013252

#TimeUsernameProblemLanguageResultExecution timeMemory
1013252amine_arouaBliskost (COI23_bliskost)C++17
28 / 100
10 ms12228 KiB
#include <bits/stdc++.h> //#pragma GCC optimize("O3") //#pragma GCC optimize("unroll-loops") using namespace std; #define int long long #define nl '\n' #define pb push_back signed main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n , q; cin>>n>>q; string s , t; cin>>s>>t; s = '.' + s; t = '.' + t; vector<int> a(n); a[0] = 0; for(int i = 1 ; i <= n - 1 ; i++) { a[i] = (t[i] - s[i] - a[i - 1] + 2 * 26)%26; } if(a[n - 1] == (t[n] - s[n] + 26)%26) cout<<"da"<<nl; else cout<<"ne"<<nl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...