제출 #889454

#제출 시각아이디문제언어결과실행 시간메모리
889454Kakarot별들과 삼각형 (IZhO11_triangle)C++98
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#define ii unordered_map<int,int>
#define vii vector<pair<int,int>>
using namespace std;

void setIO() {
  cin.tie(0)->sync_with_stdio(0);
}

void solve() {
  int n,ans = 0;
  cin >> n;
  ii fx,fy;
  while(n--) {
    int x,y;
    cin >> x >> y;
    ++fx[x];
    ++fy[y];
    ans += (fx[x] >= 2 && fy[y] >= 2);
  }
  cout << ans;
}

int main() {
  setIO();
  solve();
  return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

triangle.cpp:19:2: error: extended character   is not valid in an identifier
   19 |     ans += (fx[x] >= 2 && fy[y] >= 2);
      |  ^
triangle.cpp:19:5: error: extended character   is not valid in an identifier
   19 |     ans += (fx[x] >= 2 && fy[y] >= 2);
      |    ^
triangle.cpp: In function 'void solve()':
triangle.cpp:19:2: error: '\U000000a0' was not declared in this scope
   19 |     ans += (fx[x] >= 2 && fy[y] >= 2);
      |  ^