# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
743150 | vjudge1 | Lightning Rod (NOI18_lightningrod) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <unordered_map>
using namespace std;
inline void read(int &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;
}