Submission #1143382

#TimeUsernameProblemLanguageResultExecution timeMemory
1143382laurentiu_t새로운 문제 (POI13_spa)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;
string a,b;
int main()
{
    int k,n;
    unordered_map<string,int> m;
    cin>>n>>k>>a>>b;
    for(int i=1;i<=k;i++)
    {
        string x;
        cin>>x;
        mp[x]=-1
    }
    queue<string> q;
    q.push(a);
    while(!q.empty())
    {
        string x=q.front();
        string l=x;
        q.pop();
        
        for(int i=0;i<n;i++)
        {
            if(x[i]=='0')
                l[i]='1';
            else
                l[i]='0';
            
            if(mp[1]==0)
            {
                q.push(l); 
                mp[l]=1;
                if(l==b)
                {
                    cout<<"TAK";
                    exit(0);
                }
            }
            l[i]=x[i]
        }
        
    }
    cout<<"NIE";
}

Compilation message (stderr)

spa.cpp: In function 'int main()':
spa.cpp:13:9: error: 'mp' was not declared in this scope; did you mean 'm'?
   13 |         mp[x]=-1
      |         ^~
      |         m
spa.cpp:30:16: error: 'mp' was not declared in this scope; did you mean 'm'?
   30 |             if(mp[1]==0)
      |                ^~
      |                m
spa.cpp:40:22: error: expected ';' before '}' token
   40 |             l[i]=x[i]
      |                      ^
      |                      ;
   41 |         }
      |         ~