Submission #949722

# Submission time Handle Problem Language Result Execution time Memory
949722 2024-03-19T15:26:11 Z Duelist1234 Bliskost (COI23_bliskost) C++17
0 / 100
0 ms 348 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;
    for(int j=0;j<n;j++)
  {
    a[j]=a1[j]-'a';
    b[j]=b1[j]-'a';
  }
    a1[x-1]=g;
    a[x-1]=g-'a';
  for(int j=0;j<n-1;j++)
  {
    while(a[j]%26<b[j]%26)
    {
      a[j]++;
      a[j+1]++;
    }
    while(b[j]%26<a[j]%26)
    {
      b[j]++;
      b[j+1]++;
    }
  }
  if(a[n-1]%26!=b[n-1]%26)
  {
    cout<<"ne";
  }
  else
  {
    cout<<"da";
  }
  }
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -