# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
29344 | khsoo01 | Untitled (POI11_imp) | C++11 | 1633 ms | 37296 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
int n, m, adj[3005][3005];
bool d[3005];
int main()
{
scanf("%d%d",&n,&m);
for(int i=1;i<=m;i++) {
int A, B;
scanf("%d%d",&A,&B);
adj[A][B] = adj[B][A] = 1;
}
for(int i=1;i<=n;i++) {
for(int j=i+1;j<=n;j++) {
if(adj[i][j]) continue;
if(!d[i] && !d[j]) d[i] = d[j] = true;
}
}
int c = 0;
for(int i=1;i<=n && c < n/3;i++) {
if(!d[i]) {printf("%d ",i); c++;}
}
puts("");
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |