Submission #930818

# Submission time Handle Problem Language Result Execution time Memory
930818 2024-02-20T13:13:39 Z vjudge1 Party (POI11_imp) C++17
0 / 100
999 ms 65376 KB
#include <bits/stdc++.h>
//#define int long long
#define endl '\n'
#define pii pair<int,int>
#define vint vector<int>
#define vpii vector<pii>
#define se second
#define fi first
#define pb push_back
#define all(x) x.begin(), x.end()
#define graph vector<vint>
using namespace std;
const int N = (int)3000 + 69;
const int mod = 9999991;
const int naser = 3999, has_7 = 3662;
int INF = LLONG_MAX;
int power(int a, int bb) { int ans = 1;while (bb) { if (bb % 2) { ans *= a; }a *= a;bb /= 2; }return ans; }
int gcd(int a, int b) { if (b == 0)return a;return gcd(b, a % b); }


int main() {

    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int n, m;
    cin >> n >> m;
    int edge[N][N] = {};
    set<int> ans;
    for (int i = 1; i <= n; i++)
        ans.insert(i);
    for (int i = 0; i < m; i++) {
        int u, v;
        cin >> u >> v;
        edge[u][v] = 1;
        edge[v][u] = 1;
    }
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
            if (!edge[i][j]) {
                ans.erase(i);
                ans.erase(j);
            }
        }
    }
    for (int i : ans)
        cout << i << ' ';
}

Compilation message

imp.cpp:16:11: warning: overflow in conversion from 'long long int' to 'int' changes value from '9223372036854775807' to '-1' [-Woverflow]
   16 | int INF = LLONG_MAX;
      |           ^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 19 ms 37212 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 21 ms 37208 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 37524 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 36 ms 38228 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 58 ms 39248 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 156 ms 43860 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 320 ms 49304 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 468 ms 53280 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 628 ms 56392 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 809 ms 59820 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 999 ms 65376 KB Wypisano za ma³o osób
2 Halted 0 ms 0 KB -