답안 #43757

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
43757 2018-03-22T13:49:01 Z imaxblue Party (POI11_imp) C++14
100 / 100
895 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(){
    scan(n); scan(m);
    fox(l, m){
        scan(a); scan(b);
        adj[a][b]=adj[b][a]=1;
    }
    fox1(l, n){
        if (u[l]) continue;
        for(int l2=l+1; l2<n; ++l2){
            if (u[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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 488 KB Output is correct
3 Correct 2 ms 676 KB Output is correct
4 Correct 2 ms 748 KB Output is correct
5 Correct 2 ms 856 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 1276 KB Output is correct
2 Correct 10 ms 2920 KB Output is correct
3 Correct 10 ms 3528 KB Output is correct
4 Correct 11 ms 4240 KB Output is correct
5 Correct 11 ms 4952 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 5148 KB Output is correct
2 Correct 38 ms 9840 KB Output is correct
3 Correct 38 ms 12796 KB Output is correct
4 Correct 45 ms 15736 KB Output is correct
5 Correct 40 ms 18680 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 18 ms 18680 KB Output is correct
2 Correct 108 ms 28452 KB Output is correct
3 Correct 123 ms 35660 KB Output is correct
4 Correct 111 ms 42928 KB Output is correct
5 Correct 116 ms 50192 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 27 ms 50576 KB Output is correct
2 Correct 219 ms 64224 KB Output is correct
3 Correct 236 ms 65536 KB Output is correct
4 Correct 207 ms 65536 KB Output is correct
5 Correct 207 ms 65536 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 92 ms 65536 KB Output is correct
2 Correct 245 ms 65536 KB Output is correct
3 Correct 287 ms 65536 KB Output is correct
4 Correct 321 ms 65536 KB Output is correct
5 Correct 278 ms 65536 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 255 ms 65536 KB Output is correct
2 Correct 413 ms 65536 KB Output is correct
3 Correct 432 ms 65536 KB Output is correct
4 Correct 450 ms 65536 KB Output is correct
5 Correct 403 ms 65536 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 365 ms 65536 KB Output is correct
2 Correct 547 ms 65536 KB Output is correct
3 Correct 516 ms 65536 KB Output is correct
4 Correct 544 ms 65536 KB Output is correct
5 Correct 480 ms 65536 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 446 ms 65536 KB Output is correct
2 Correct 665 ms 65536 KB Output is correct
3 Correct 611 ms 65536 KB Output is correct
4 Correct 698 ms 65536 KB Output is correct
5 Correct 646 ms 65536 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 547 ms 65536 KB Output is correct
2 Correct 704 ms 65536 KB Output is correct
3 Correct 732 ms 65536 KB Output is correct
4 Correct 714 ms 65536 KB Output is correct
5 Correct 714 ms 65536 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 717 ms 65536 KB Output is correct
2 Correct 895 ms 65536 KB Output is correct
3 Correct 846 ms 65536 KB Output is correct
4 Correct 806 ms 65536 KB Output is correct
5 Correct 800 ms 65536 KB Output is correct