Submission #108118

#TimeUsernameProblemLanguageResultExecution timeMemory
108118wilwxkRegions (IOI09_regions)C++11
0 / 100
40 ms13432 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; 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 (stderr)

regions.cpp: In function 'int main()':
regions.cpp:16: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:18: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...