Submission #1772432
Source Code Expand
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; int main() { int N, M; int x, y; int result = 1; cin >> N >> M; int friends[N][N]; for(int i=0; i<N; i++)for(int j=0; j<N; j++) friends[i][j] = 0; for(int i=0; i<M; i++){ cin >> x >> y; friends[x][y] = friends[x][y] = 1; } for(int i=0; i<(1<<N); i++){ bool ok = true; for(int j=0; j<N; j++)for(int k=0; k<N; k++){ if(((i >> j) & 1) & ((i >> k) & 1) ) if(friends[j][k] != friends[k][j]) ok = false; } if(ok) result = max(result, __builtin_popcount(i)); } cout << result << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 正直者 |
User | minagawawa |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 683 Byte |
Status | RE |
Exec Time | 2103 ms |
Memory | 256 KB |
Judge Result
Set Name | all | ||||
---|---|---|---|---|---|
Score / Max Score | 0 / 100 | ||||
Status |
|
Set Name | Test Cases |
---|---|
all | 00_sample_01.txt, 00_sample_02.txt, kensho_diff01, kensho_diff02, kensho_diff03, kensho_diff04, kensho_diff05, kensho_min-max01, kensho_min-max02, kensho_min-max03, kensho_min-max04, kensho_min-max05, kensho_min-max06, kensho_min-max07, kensho_min-max08, kensho_min-max09, kensho_min-max10, kensho_rand01, kensho_rand02, kensho_rand03, kensho_rand04, kensho_rand05, kensho_rand06, kensho_rand07, kensho_rand08, kensho_rand09, kensho_rand10 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | RE | 98 ms | 256 KB |
00_sample_02.txt | RE | 99 ms | 256 KB |
kensho_diff01 | RE | 99 ms | 256 KB |
kensho_diff02 | RE | 99 ms | 256 KB |
kensho_diff03 | RE | 99 ms | 256 KB |
kensho_diff04 | RE | 100 ms | 256 KB |
kensho_diff05 | RE | 99 ms | 256 KB |
kensho_min-max01 | RE | 99 ms | 256 KB |
kensho_min-max02 | RE | 100 ms | 256 KB |
kensho_min-max03 | TLE | 2103 ms | 256 KB |
kensho_min-max04 | TLE | 2103 ms | 256 KB |
kensho_min-max05 | RE | 100 ms | 256 KB |
kensho_min-max06 | TLE | 2103 ms | 256 KB |
kensho_min-max07 | RE | 100 ms | 256 KB |
kensho_min-max08 | RE | 99 ms | 256 KB |
kensho_min-max09 | RE | 100 ms | 256 KB |
kensho_min-max10 | TLE | 2103 ms | 256 KB |
kensho_rand01 | RE | 101 ms | 256 KB |
kensho_rand02 | RE | 100 ms | 256 KB |
kensho_rand03 | RE | 100 ms | 256 KB |
kensho_rand04 | RE | 100 ms | 256 KB |
kensho_rand05 | RE | 100 ms | 256 KB |
kensho_rand06 | RE | 99 ms | 256 KB |
kensho_rand07 | RE | 99 ms | 256 KB |
kensho_rand08 | RE | 99 ms | 256 KB |
kensho_rand09 | RE | 99 ms | 256 KB |
kensho_rand10 | RE | 100 ms | 256 KB |