Submission #896027

# Submission time Handle Problem Language Result Execution time Memory
896027 2023-12-31T13:07:36 Z wilsp Lightning Rod (NOI18_lightningrod) C++17
Compilation error
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