QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#353356 | #7857. (-1,1)-Sumplete | ucup-team3215 | Compile Error | / | / | C++20 | 828b | 2024-03-14 04:56:43 | 2024-03-14 04:56:43 |
Judging History
answer
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
cin.tie(0)->sync_with_stdio(0);
int n; cin >> n;
vector<string> v(n);
for (auto& s: v) cin >> s;
vector<tuple<int, int>> r(n), c(n), t(n);
for (int i = 0; auto& [r, j]: r) cin >> r, j = i++;
for (int i = 0; auto& [c, j]: c) cin >> c, j = i++;
for (auto& [r, i]: r)
for (auto& [c, j]: c) if (v[i][j] == '-') ++r, ++c;
sort(r.rbegin(), r.rend());
sort(c.rbegin(), c.rend());
for (auto [x, i]: r) {
for (auto& [y, j]: c) if (x > 0) v[i][j] ^= 6, --y, --x;
sort((uint64_t*)&c[0], (uint64_t*)&c[n], greater{});
if (x || get<0>(c[n - 1]) < 0) return cout << "No\n", 0;
}
cout << "Yes\n";
for (auto& s: v) { for (auto& c: s) c = c == '-'? '1': '0'; cout << s << '\n'; }
}
Details
answer.code: In function ‘int main()’: answer.code:21:11: error: ‘uint64_t’ was not declared in this scope 21 | sort((uint64_t*)&c[0], (uint64_t*)&c[n], greater{}); | ^~~~~~~~ answer.code:4:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’? 3 | #include <vector> +++ |+#include <cstdint> 4 | answer.code:21:20: error: expected primary-expression before ‘)’ token 21 | sort((uint64_t*)&c[0], (uint64_t*)&c[n], greater{}); | ^ answer.code:21:38: error: expected primary-expression before ‘)’ token 21 | sort((uint64_t*)&c[0], (uint64_t*)&c[n], greater{}); | ^