Submission #486312


Source Code Expand

Copy
#define DEB
#include<bits/stdc++.h>
#define REP(i,m) for(int i=0;i<(m);++i)
#define REPN(i,m,in) for(int i=(in);i<(m);++i)
#define ALL(t) (t).begin(),(t).end()
#define CLR(a) memset((a),0,sizeof(a))
#define pb push_back
#define mp make_pair
#define fr first
#define sc second

using namespace std;


#ifdef DEB
#define dump(x)  cerr << #x << " = " << (x) << endl
#define prl cerr<<"called:"<< __LINE__<<endl
template<class T> void debug(T a,T b){ for(;a!=b;++a) cerr<<*a<<' ';cerr<<endl;}
#else
#define dump(x) ;
#define prl ;
template<class T> void debug(T a,T b){ ;}
#endif

template<class T> void chmin(T& a,const T& b) { if(a>b) a=b; }
template<class T> void chmax(T& a,const T& b) { if(a<b) a=b; }

typedef long long int lint;
typedef pair<int,int> pi;

namespace std{
	template<class S,class T>
	ostream &operator <<(ostream& out,const pair<S,T>& a){
		out<<'('<<a.fr<<','<<a.sc<<')';
		return out;
	}
}

//const int INF=5e8;

int n,m,k;
pi es[105];
int main(){
  cin>>n>>m>>k;
  REP(i,m){
    cin>>es[i].fr>>es[i].sc;
  }

  if(n<=26){
    bool fail=false;
    REP(i,(1<<n)) if(__builtin_popcount(i)==k){
      REP(j,m) if(i>>es[j].fr&1 && i>>es[j].sc&1){
        fail=true;
        break;
      }
      if(!fail){
        REP(j,n) if(i>>j&1) printf("%d\n",j);
        return 0;
      }
    }
  }

		

	return 0;
}


Submission Info

Submission Time
Task B - B 問題
User hogloid
Language C++11 (GCC 4.9.2)
Score 0
Code Size 1392 Byte
Status
Exec Time 35 ms
Memory 928 KB

Judge Result

Set Name Score / Max Score Test Cases
All 0 / 10 00_sample_1.txt, 00_sample_2.txt, 00_sample_3.txt, 20_random_1.txt, 20_random_10.txt, 20_random_11.txt, 20_random_12.txt, 20_random_13.txt, 20_random_14.txt, 20_random_15.txt, 20_random_16.txt, 20_random_17.txt, 20_random_18.txt, 20_random_19.txt, 20_random_2.txt, 20_random_20.txt, 20_random_21.txt, 20_random_22.txt, 20_random_23.txt, 20_random_24.txt, 20_random_25.txt, 20_random_26.txt, 20_random_27.txt, 20_random_28.txt, 20_random_29.txt, 20_random_3.txt, 20_random_30.txt, 20_random_4.txt, 20_random_5.txt, 20_random_6.txt, 20_random_7.txt, 20_random_8.txt, 20_random_9.txt
Case Name Status Exec Time Memory
00_sample_1.txt 28 ms 668 KB
00_sample_2.txt 26 ms 916 KB
00_sample_3.txt 25 ms 792 KB
20_random_1.txt 27 ms 796 KB
20_random_10.txt 26 ms 804 KB
20_random_11.txt 26 ms 796 KB
20_random_12.txt 26 ms 792 KB
20_random_13.txt 26 ms 800 KB
20_random_14.txt 25 ms 728 KB
20_random_15.txt 25 ms 796 KB
20_random_16.txt 26 ms 920 KB
20_random_17.txt 25 ms 916 KB
20_random_18.txt 27 ms 800 KB
20_random_19.txt 25 ms 788 KB
20_random_2.txt 26 ms 912 KB
20_random_20.txt 26 ms 792 KB
20_random_21.txt 26 ms 916 KB
20_random_22.txt 27 ms 748 KB
20_random_23.txt 30 ms 796 KB
20_random_24.txt 26 ms 928 KB
20_random_25.txt 26 ms 792 KB
20_random_26.txt 26 ms 800 KB
20_random_27.txt 35 ms 792 KB
20_random_28.txt 27 ms 916 KB
20_random_29.txt 31 ms 788 KB
20_random_3.txt 26 ms 672 KB
20_random_30.txt 26 ms 800 KB
20_random_4.txt 26 ms 796 KB
20_random_5.txt 28 ms 920 KB
20_random_6.txt 28 ms 800 KB
20_random_7.txt 27 ms 796 KB
20_random_8.txt 28 ms 792 KB
20_random_9.txt 26 ms 792 KB