Submission #29346

# Submission time Handle Problem Language Result Execution time Memory
29346 2017-07-19T03:23:17 Z tlwpdus Party (POI11_imp) C++11
0 / 100
1293 ms 39560 KB
#include <bits/stdc++.h>

using namespace std;

int n, m;
int mat[3100][3100];
bool die[3100];

int main() {
    int i, j;

    scanf("%d%d",&n,&m);
    for (i=0;i<m;i++) {
		int a, b;
		scanf("%d%d",&a,&b); --a; --b;
		mat[a][b] = mat[b][a] = 1;
    }
    for (i=0;i<n;i++) {
		for (j=0;j<n;j++) {
			if (die[i]||die[j]) continue;
			if (!mat[i][j]) die[i] = die[j] = 1;
		}
    }
    for (i=0;i<n;i++) {
		if (!die[i]) printf("%d ",i+1);
    }
    printf("\n");

    return 0;
}

Compilation message

imp.cpp: In function 'int main()':
imp.cpp:12:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d",&n,&m);
                        ^
imp.cpp:15:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d",&a,&b); --a; --b;
                      ^
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 39560 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 39560 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 13 ms 39560 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 23 ms 39560 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 99 ms 39560 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 326 ms 39560 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 623 ms 39560 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 799 ms 39560 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 859 ms 39560 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1136 ms 39560 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1293 ms 39560 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -