답안 #948299

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
948299 2024-03-18T03:55:21 Z ezzzay DNA 돌연변이 (IOI21_dna) C++17
컴파일 오류
0 ms 0 KB
#include "dna.h"
#include<bits/stdc++.h>
#include<string>
#include<string.h>
#include<queue>
#include<map>
#include<map.h>
#define ff first
#define ss second
#define pb push_back

void init(std::string a, std::string b) {
}

int get_distance(int x, int y) {
	string s=a.substr(x,y-x+1);
	string t=b.substr(x,y-x+1);
	map<string,int>mp;
	mp[s]=1;
	queue<pair<int,int>>q;
	q.push({s,1});
	while(!q.empty()){
		string a=q.front().ff;
		int w=q.front().ss;
		if(a==t){
			return w-1;
		}
		q.pop();
		for(int i=0;i<a.size();i++){
			for(int j=0;j<a.size();j++){
				string tmp=a;
				swap(tmp[i],tmp[j]);
				if(mp[tmp]==0){
					mp[tmp]=w+1;
					q.push({tmp,w+1});
				}
			}
		}
	}
	return -1;
}

Compilation message

dna.cpp:7:9: fatal error: map.h: No such file or directory
    7 | #include<map.h>
      |         ^~~~~~~
compilation terminated.