QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#777504 | #9788. Shreckless | ucup-team3099# | Compile Error | / | / | C++23 | 1.4kb | 2024-11-24 02:37:48 | 2024-11-24 02:37:48 |
Judging History
answer
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t; cin >> t;
while (t--) {
int m, n; cin >> m >> n;
vector a(m, vector<int>(n));
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
cin >> a[i][j];
}
}
vector<int> lst(m, 0);
bool good = false;
for (int j = 0; j < n; j++) {
vector<int> cur;
for (int i = 0; i < m; i++) {
cur.push_back(a[i][j]);
}
sort(cur.begin(), cur.end());
int le = -1, ri = lst.size();
while (le + 1 < ri) {
int mi = (le + ri) / 2;
bool ok = true;
for (int i = 0; i + mi < lst.size(); i++) {
if (lst[i + mi] <= cur[i]) {
ok = false;
break;
}
}
(ok ? ri : le) = mi;
}
int ans = (int)lst.size() - ri;
// cerr << j << ": " << ans << '\n';
lst = vector(cur.end() - (lst.size() - ans), cur.end());
if (lst.empty()) {
good = true;
break;
}
}
cout << (good ? "YES\n" : "NO\n");
}
}
Details
answer.code:2:10: fatal error: atcoder/all: No such file or directory 2 | #include <atcoder/all> | ^~~~~~~~~~~~~ compilation terminated.