제출 #1348966

#제출 시각아이디문제언어결과실행 시간메모리
1348966jumpExhibition (JOI19_ho_t2)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#define int long long

std::vector<std::pair<int,int>> pic;
std::vector<int> frame;
int dsu[100010];
signed main(){
	int n,m;
	std::cin >> n >> m;
	for(int i=0;i<n;i++){
		int s,v;
		std::cin >> s >> v;
		pic.push_back({v,s});
	}
	std::sort(pic.begin(),pic.end());
	for(int i=0;i<m;i++){
		dsu[i]
		int s;
		std::cin >> s;
		frame.push_back(s);
	}
	std::sort(frame.begin(),frame.end());
	int i=m,j=n,ans=0;
	while(i>=0&&j>=0){
		if(a[j].second <= c[i]){
            ++ans; --i; --j;
        }else{
            --j;
        }
	}
	std::cout << ans;
}

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

joi2019_ho_t2.cpp: In function 'int main()':
joi2019_ho_t2.cpp:17:23: error: expected ';' before 'long'
   17 |                 dsu[i]
      |                       ^
      |                       ;
joi2019_ho_t2.cpp:19:29: error: 's' was not declared in this scope
   19 |                 std::cin >> s;
      |                             ^
joi2019_ho_t2.cpp:25:20: error: 'a' was not declared in this scope
   25 |                 if(a[j].second <= c[i]){
      |                    ^
joi2019_ho_t2.cpp:25:35: error: 'c' was not declared in this scope
   25 |                 if(a[j].second <= c[i]){
      |                                   ^