답안 #94252

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
94252 2019-01-17T06:31:14 Z autumn_eel Bitaro’s Party (JOI18_bitaro) C++14
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef pair<int,int>P;

#define B 100

vector<int>E[200000];
set<P>dp[200000];
map<int,int>mp[200000];

int main(){
	int n,m,q;cin>>n>>m>>q;
	rep(i,m){
		int s,t;scanf("%d%d",&s,&t);s--;t--;
		E[s].push_back(t);
	}
	rep(i,n)dp[i].push(P(0,i));
	rep(i,n){
		for(auto p:dp[i]){
			for(int u:E[i]){
				if(mp[u][p.second]<=p.first){
					dp[u].erase(P(mp[u][p.second],p.second));
					mp[u][p.second]=p.first+1;
					dp[u].insert(P(mp[u][p.second],p.second));
				}
				while(mp[u].size()>B)mp[u].erase(mp[u].begin());
			}
		}
	}
	rep(i,q){
		int t,y;scanf("%d%d",&t,&y);t--;
		
		rep(j,y)
	}
}

Compilation message

bitaro.cpp: In function 'int main()':
bitaro.cpp:18:16: error: 'class std::set<std::pair<int, int> >' has no member named 'push'
  rep(i,n)dp[i].push(P(0,i));
                ^~~~
bitaro.cpp:35:2: error: expected primary-expression before '}' token
  }
  ^
bitaro.cpp:15:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   int s,t;scanf("%d%d",&s,&t);s--;t--;
           ~~~~~^~~~~~~~~~~~~~
bitaro.cpp:32:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   int t,y;scanf("%d%d",&t,&y);t--;
           ~~~~~^~~~~~~~~~~~~~