# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
949703 | 2024-03-19T15:21:04 Z | Duelist1234 | Bliskost (COI23_bliskost) | C++17 | 1 ms | 344 KB |
#include <iostream> using namespace std; int main() { int n,q; cin>>n>>q; int a[n],x,b[n]; string a1,b1; cin>>a1>>b1; char g; for(int i=0;i<q;i++) { cin>>x>>g; a[x-1]=g-'a'; for(int i=0;i<n;i++) { a[i]=a1[i]-'a'; b[i]=b1[i]-'a'; } int f=0; for(int i=0;i<n-1;i++) { while(a[i]<b[i]) { a[i]++; a[i+1]++; } while(b[i]<a[i]) { b[i]++; b[i+1]++; } } if(a[n-1]!=b[n-1]) { cout<<"ne"<<endl; } else { cout<<"da"<<endl; } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 344 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |