제출 #1290976

#제출 시각아이디문제언어결과실행 시간메모리
1290976ChuanChenSplit the Attractions (IOI19_split)C++20
컴파일 에러
0 ms0 KiB
#include "shoes.h"
#include<bits/stdc++.h>
using namespace std;
#define debug(v) cerr << #v << ": " << v << "   ";
#define debugln(v) cerr << #v << ": " << v << endl;

typedef long long ll;
const int MAXN = 2e5+5;

int n;
stack<int> freq[MAXN];

int  pos2[2*MAXN];
int* pos = pos2+MAXN;
ll ans = 0;
int bit[MAXN];

int query(int pos){
	int x = 0;
	for(; pos > 0; pos -= ((-pos)&pos)) x += bit[pos];
	return x;
}
void update(int pos){
	for(; pos <= MAXN; pos += ((-pos)&pos))
		bit[pos]++;
}

long long count_swaps(vector<int> s){
	vector<int> filt(s.size());
	ll cnt = 0;
	for(int i = 0; i < (int)s.size(); i++){
		if(s[i] < 0){
			cnt++;
			freq[-s[i]].push(i);
			filt[i] = -cnt;
		}
	}
	for(int i = s.size()-1; i >= 0; i--){
		if(s[i] > 0){
			filt[i] = -filt[freq[s[i]].top()];
			freq[s[i]].pop(); 
		}
	}

	vector<int> f;
	for(int i = s.size()-1; i >= 0; i--){
		if(filt[i] < 0) f.push_back(-2*filt[i]-1);
		else f.push_back(filt[i]*2);
		// f.push_back(filt[i]);
		// pos[filt[i]] = i;
	}
	for(int x : f){
		update(x);
		ans += query(x-1);
	}
	return ans;
}

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

split.cpp:1:10: fatal error: shoes.h: No such file or directory
    1 | #include "shoes.h"
      |          ^~~~~~~~~
compilation terminated.