제출 #108112

#제출 시각아이디문제언어결과실행 시간메모리
108112wilwxkRegions (IOI09_regions)C++11
0 / 100
41 ms6952 KiB
#include <bits/stdc++.h> using namespace std; const int MAXN=200005; const int MAXC=25005; const int T=600; vector<int> g[MAXN]; vector<int> lista[MAXC]; map<int, int> mp; int cor[MAXN], tam[MAXN]; char isbig[MAXC]; int dp[MAXN][(MAXN/T)+2], dp2[MAXN][(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(auto &mit : mp) mit.second=++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...