답안 #896027

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
896027 2023-12-31T13:07:36 Z wilsp Lightning Rod (NOI18_lightningrod) C++17
컴파일 오류
0 ms 0 KB
#include <iostream>
#include <vector>
 
using namespace std;
 
int main()
{
    
	int n;
  	cin >> n;
    vector<pair<int,int>> coords;
  
    for(int i = 0; i<n; i++)
    {
      int x,y;
      cin >> x >> y;
      coords.pushback(make_pair(x,y));
    }
    cout << n;
 
 
 
	
 
	return 0;
}

Compilation message

lightningrod.cpp: In function 'int main()':
lightningrod.cpp:17:14: error: 'class std::vector<std::pair<int, int> >' has no member named 'pushback'; did you mean 'push_back'?
   17 |       coords.pushback(make_pair(x,y));
      |              ^~~~~~~~
      |              push_back