#include <iostream>

using namespace std;

void unos_niza(int a[],int b[],int n)
{
    for (int i=0;i<n;i++)
        cin >> a[i] >> b[i];
}

int broj_jedinica(string a,int n)
{
    int i,k=0;
    for (i=0;i<n;i++)
        if (a[i]==1)
            k++;
    return k;
}

int broj_nula(string a,int n)
{
    int i,k=0;
    for (i=0;i<n;i++)
        if (a[i]==0)
            k++;
    return k;
}

int main()
{
    int n,c,q,i,j;
    cin >> n >> c >> q;
    string s;
    cin >> s;
    int l[q],r[q],konacno[q];
    unos_niza(l,r,q);
    for (i=0;i<q;i++)
    {
       if (l[i]+r[i]>n)
            return 0;
        else
        {
            for (j=l[i]-1;j<=r[i];j++)
            {
                if (s[i]==0)
                    s[i]=1;
                else
                    s[i]=0;
            }
            if (broj_jedinica(s,n)>broj_nula(s,n))
                for (j=0;j<n;j++)
                {
                    if (s[i]==0)
                        s[i]=1;
                    else
                        s[i]=0;
                }
            konacno[i]=c+broj_jedinica(s,n)*c;
            cout << konacno[i] << endl;
        }
    }
    return 0;
}