Submission #1053376

# Submission time Handle Problem Language Result Execution time Memory
1053376 2024-08-11T11:07:22 Z Ludissey Make them Meet (EGOI24_makethemmeet) C++17
24 / 100
1 ms 464 KB
#include <bits/stdc++.h>
#define int long long
#define sz(a) (int)a.size()
#define all(a) a.begin(), a.end()
using namespace std;
int N,M,Q;
signed main() {
    ios_base::sync_with_stdio(false); cin.tie(nullptr);
    cin >> N >> M;
    vector<pair<int,int>> ed(M);
    for (int i = 0; i < M; i++)
    {
        cin >> ed[i].first >> ed[i].second;
        if(ed[i].first>ed[i].second) swap(ed[i].first,ed[i].second);
    }
    sort(all(ed));
    cout << N << "\n";
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < N; j++)
        {
            cout << (j+(i%2))/2 << ' ';
        }
        cout << '\n';
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB If people start at 0 and 2, then they can avoid each other
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 428 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 464 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB If people start at 0 and 2, then they can avoid each other
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Incorrect 0 ms 348 KB If people start at 0 and 2, then they can avoid each other
3 Halted 0 ms 0 KB -