답안 #743152

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
743152 2023-05-17T08:23:52 Z vjudge1 Lightning Rod (NOI18_lightningrod) C++17
컴파일 오류
0 ms 0 KB
#include <iostream>
#include <unordered_map>
using namespace std;

inline void read(long long &x)
{
    x = 0;
    char ch = getchar_unlocked();
    while (ch & 16)
    {
        x = (x << 3) + (x << 1) + (ch & 15);
        ch = getchar_unlocked();
    }
}

int main ()
{
    unordered_map<int,int> m;
    long long n, a, b, sum = 0;
    read(n);
    for(long long i = 0;i < n;++i)
    {
        read(a);
        read(b);
        if(ma[a] == 0)
        {
            ma[a] = 1;
            sum++;
        }
    }
    cout << sum;
}

Compilation message

lightningrod.cpp: In function 'int main()':
lightningrod.cpp:25:12: error: 'ma' was not declared in this scope; did you mean 'a'?
   25 |         if(ma[a] == 0)
      |            ^~
      |            a