답안 #108117

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
108117 2019-04-27T13:45:21 Z wilwxk Regions (IOI09_regions) C++11
0 / 100
41 ms 13440 KB
#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--) {

	}

}

Compilation message

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);
                 ~~~~~^~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 7 ms 5632 KB Unexpected end of file - int32 expected
2 Incorrect 7 ms 5504 KB Unexpected end of file - int32 expected
3 Incorrect 10 ms 5504 KB Unexpected end of file - int32 expected
4 Incorrect 6 ms 5632 KB Unexpected end of file - int32 expected
5 Incorrect 9 ms 5504 KB Unexpected end of file - int32 expected
6 Incorrect 7 ms 5632 KB Unexpected end of file - int32 expected
7 Incorrect 8 ms 5632 KB Unexpected end of file - int32 expected
8 Incorrect 7 ms 5632 KB Unexpected end of file - int32 expected
9 Incorrect 9 ms 5808 KB Unexpected end of file - int32 expected
10 Incorrect 10 ms 5988 KB Unexpected end of file - int32 expected
11 Incorrect 12 ms 6144 KB Unexpected end of file - int32 expected
12 Incorrect 19 ms 6400 KB Unexpected end of file - int32 expected
13 Incorrect 17 ms 6272 KB Unexpected end of file - int32 expected
14 Runtime error 27 ms 13056 KB Execution killed with signal 11 (could be triggered by violating memory limits)
15 Runtime error 28 ms 13176 KB Execution killed with signal 11 (could be triggered by violating memory limits)
# 결과 실행 시간 메모리 Grader output
1 Runtime error 31 ms 13176 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Runtime error 23 ms 12544 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Runtime error 34 ms 13264 KB Execution killed with signal 11 (could be triggered by violating memory limits)
4 Runtime error 36 ms 13304 KB Execution killed with signal 11 (could be triggered by violating memory limits)
5 Runtime error 33 ms 13304 KB Execution killed with signal 11 (could be triggered by violating memory limits)
6 Runtime error 37 ms 13168 KB Execution killed with signal 11 (could be triggered by violating memory limits)
7 Runtime error 30 ms 13144 KB Execution killed with signal 11 (could be triggered by violating memory limits)
8 Runtime error 34 ms 13304 KB Execution killed with signal 11 (could be triggered by violating memory limits)
9 Runtime error 27 ms 13312 KB Execution killed with signal 11 (could be triggered by violating memory limits)
10 Runtime error 29 ms 13304 KB Execution killed with signal 11 (could be triggered by violating memory limits)
11 Runtime error 41 ms 12796 KB Execution killed with signal 11 (could be triggered by violating memory limits)
12 Runtime error 37 ms 13308 KB Execution killed with signal 11 (could be triggered by violating memory limits)
13 Runtime error 30 ms 13176 KB Execution killed with signal 11 (could be triggered by violating memory limits)
14 Runtime error 32 ms 13048 KB Execution killed with signal 11 (could be triggered by violating memory limits)
15 Runtime error 31 ms 13440 KB Execution killed with signal 11 (could be triggered by violating memory limits)
16 Runtime error 29 ms 13440 KB Execution killed with signal 11 (could be triggered by violating memory limits)
17 Runtime error 29 ms 13352 KB Execution killed with signal 11 (could be triggered by violating memory limits)