제출 #246256

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
2462562020-07-08 12:52:40m3r8Political Development (BOI17_politicaldevelopment)C++14
4 / 100
3089 ms311672 KiB
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
#include <bitset>
#include <utility>
#define N 50100
#define ii std::pair<int,int>
std::set<int> tst[N];
std::vector<int> adj[N];
int k;
std::vector<std::bitset<N>> add(N);
int cclq(std::bitset<N> akt, std::bitset<N> can, int idx, int depth){
int mx = depth;
if(akt.count() < depth)return depth-1;
else if(depth >= k)return depth;
else{
for(int i = 0;i<adj[idx].size();i++){
if((add[adj[idx][i]]&can).count() >= depth){
can[adj[idx][i]] = 1;
mx = std::max(mx,cclq(akt&add[adj[idx][i]],can,adj[idx][i],depth+1));
can[adj[idx][i]] = 0;
};
};
};
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

politicaldevelopment.cpp: In function 'int cclq(std::bitset<50100>, std::bitset<50100>, int, int)':
politicaldevelopment.cpp:20:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if(akt.count() < depth)return depth-1;
      ~~~~~~~~~~~~^~~~~~~
politicaldevelopment.cpp:23:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0;i<adj[idx].size();i++){
                   ~^~~~~~~~~~~~~~~~
politicaldevelopment.cpp:24:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if((add[adj[idx][i]]&can).count() >= depth){
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
politicaldevelopment.cpp: In function 'int clq(std::vector<int>, int, int)':
politicaldevelopment.cpp:38:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0;i<akt.size();i++){
                   ~^~~~~~~~~~~
politicaldevelopment.cpp:40:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       for(int j = i+1;j<akt.size();j++){
                       ~^~~~~~~~~~~
politicaldevelopment.cpp: In function 'int main()':
politicaldevelopment.cpp:53:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d",&n,&k);
   ~~~~~^~~~~~~~~~~~~~~
politicaldevelopment.cpp:59:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&d);
     ~~~~~^~~~~~~~~
politicaldevelopment.cpp:61:12: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
       scanf("%d",&x);
       ~~~~~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...