Submission #1053376

#TimeUsernameProblemLanguageResultExecution timeMemory
1053376LudisseyMake them Meet (EGOI24_makethemmeet)C++17
24 / 100
1 ms464 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...