제출 #108117

#제출 시각아이디문제언어결과실행 시간메모리
108117wilwxkRegions (IOI09_regions)C++11
0 / 100
41 ms13440 KiB
#include <bits/stdc++.h>
using namespace std;

const int MAXN=200005;
const int MAXC=25005;
const int T=550;
vector<int> g[MAXN];
vector<int> lista[MAXC];
short mp[MAXC];
short cor[MAXN];
char isbig[MAXC];
int dp[MAXC][(MAXN/T)+2], dp2[MAXC][(MAXN/T)+2];
int n, cores, q, cntbig;

void dfs(int cur) {
	dp[cur][mp[cor[cur]]]++;
	for(auto viz : g[cur]) {
		dfs(viz);
		for(int i=1; i<=cntbig; i++) dp[cur][i]+=dp[viz][i];
	}
} 

int main() {
	scanf("%d %d %d", &n, &cores, &q);
	for(int i=1; i<=n; i++) {
		int a=0, b=0; scanf("%d %d", &a, &b);
		g[a].push_back(i); cor[i]=b;
		lista[b].push_back(i);
		if(lista[b].size()==T) isbig[b]=1, mp[b]=1;
	}
	for(int i=1; i<=cores; i++) if(isbig[i]) mp[i]=++cntbig;

	while(q--) {

	}

}

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

regions.cpp: In function 'int main()':
regions.cpp:24:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d %d", &n, &cores, &q);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
regions.cpp:26:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   int a=0, b=0; scanf("%d %d", &a, &b);
                 ~~~~~^~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...