#include <iostream>

using namespace std;

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

void postavljanje_niza(int a[],int n)
{
    for (int i=0;i<n;i++)
        a[i]=0;
}

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,q);
    unos_niza(r,q);
    postavljanje_niza(konacno,q);
    if (s.size()>n)
        return 0;
    for (i=0;i<n;i++)
        if (s[i]!=0 && s[i]!=1)
            return 0;
    for (i=0;i<q;i++)
        if (l[i]+r[i]<=n && l[i]>0 && r[i]>0)
        {
            for (j=min(l[i],r[i])-1;j<=max(l[i],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;
}