# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
43755 |
2018-03-22T13:43:46 Z |
imaxblue |
Party (POI11_imp) |
C++14 |
|
1431 ms |
65536 KB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
#define x first
#define y second
#define pii pair<int, int>dazaq
#define p3i pair<pii, int>
#define pll pair<ll, ll>
#define p3l pair<pll, ll>
#define lseg L, (L+R)/2, N*2+1
#define rseg (L+R)/2+1, R, N*2+2
#define ub upper_bound
#define lb lower_bound
#define pq priority_queue
#define MN 1000000007
#define fox(k, x) for (int k=0; k<x; ++k)
#define fox1(k, x) for (int k=1; k<=x; ++k)
#define foxr(k, x) for (int k=x-1; k>=0; --k)
#define fox1r(k, x) for (int k=x; k>0; --k)
#define ms multiset
#define flood(x) memset(x, 0x3f3f3f3f, sizeof x)
#define drain(x) memset(x, 0, sizeof x)
#define rng() ((rand() << 14)+rand())
#define scan(X) do{while((X=getchar())<'0'); for(X-='0'; '0'<=(_=getchar()); X=(X<<3)+(X<<1)+_-'0');}while(0)
char _;
#define pi 3.14159265358979323846
int n, m, a, b;
bool adj[3005][3005], u[3005];
int main(){
scanf("%i%i", &n, &m);
fox(l, m){
scanf("%i%i", &a, &b);
adj[a][b]=adj[b][a]=1;
}
fox1(l, n){
if (u[l]) continue;
fox1(l2, n){
if (u[l2] || l==l2) continue;
if (!adj[l][l2]){
u[l]=1; u[l2]=1;
//cout << l << ' ' << l2 << endl;
break;
}
}
}
int c=0;
fox1(l, n){
if (u[l]) continue;
c++;
printf("%i ", l);
if (c==n/3) break;
}
return 0;
}
Compilation message
imp.cpp: In function 'int main()':
imp.cpp:33:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i%i", &n, &m);
^
imp.cpp:35:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i%i", &a, &b);
^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
380 KB |
Output is correct |
2 |
Correct |
2 ms |
492 KB |
Output is correct |
3 |
Correct |
3 ms |
804 KB |
Output is correct |
4 |
Correct |
3 ms |
888 KB |
Output is correct |
5 |
Correct |
3 ms |
888 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
1432 KB |
Output is correct |
2 |
Correct |
24 ms |
2952 KB |
Output is correct |
3 |
Correct |
24 ms |
3604 KB |
Output is correct |
4 |
Correct |
26 ms |
4420 KB |
Output is correct |
5 |
Correct |
24 ms |
5132 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
5316 KB |
Output is correct |
2 |
Correct |
142 ms |
10028 KB |
Output is correct |
3 |
Correct |
99 ms |
13024 KB |
Output is correct |
4 |
Correct |
96 ms |
15836 KB |
Output is correct |
5 |
Correct |
96 ms |
18916 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
18916 KB |
Output is correct |
2 |
Correct |
278 ms |
28684 KB |
Output is correct |
3 |
Correct |
281 ms |
35868 KB |
Output is correct |
4 |
Correct |
280 ms |
43152 KB |
Output is correct |
5 |
Correct |
304 ms |
50336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
87 ms |
50688 KB |
Output is correct |
2 |
Correct |
531 ms |
64452 KB |
Output is correct |
3 |
Correct |
419 ms |
65536 KB |
Output is correct |
4 |
Correct |
479 ms |
65536 KB |
Output is correct |
5 |
Correct |
472 ms |
65536 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
266 ms |
65536 KB |
Output is correct |
2 |
Correct |
567 ms |
65536 KB |
Output is correct |
3 |
Correct |
535 ms |
65536 KB |
Output is correct |
4 |
Correct |
629 ms |
65536 KB |
Output is correct |
5 |
Correct |
581 ms |
65536 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
511 ms |
65536 KB |
Output is correct |
2 |
Correct |
775 ms |
65536 KB |
Output is correct |
3 |
Correct |
770 ms |
65536 KB |
Output is correct |
4 |
Correct |
821 ms |
65536 KB |
Output is correct |
5 |
Correct |
800 ms |
65536 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
683 ms |
65536 KB |
Output is correct |
2 |
Correct |
928 ms |
65536 KB |
Output is correct |
3 |
Correct |
932 ms |
65536 KB |
Output is correct |
4 |
Correct |
937 ms |
65536 KB |
Output is correct |
5 |
Correct |
927 ms |
65536 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
792 ms |
65536 KB |
Output is correct |
2 |
Correct |
1068 ms |
65536 KB |
Output is correct |
3 |
Correct |
1131 ms |
65536 KB |
Output is correct |
4 |
Correct |
1142 ms |
65536 KB |
Output is correct |
5 |
Correct |
1121 ms |
65536 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
945 ms |
65536 KB |
Output is correct |
2 |
Correct |
1257 ms |
65536 KB |
Output is correct |
3 |
Correct |
1256 ms |
65536 KB |
Output is correct |
4 |
Correct |
1262 ms |
65536 KB |
Output is correct |
5 |
Correct |
1253 ms |
65536 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1206 ms |
65536 KB |
Output is correct |
2 |
Correct |
1315 ms |
65536 KB |
Output is correct |
3 |
Correct |
1431 ms |
65536 KB |
Output is correct |
4 |
Correct |
1401 ms |
65536 KB |
Output is correct |
5 |
Correct |
1359 ms |
65536 KB |
Output is correct |