QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#202952 | #5255. Greedy Drawers | ucup-team288# | WA | 0ms | 3596kb | C++20 | 1.2kb | 2023-10-06 14:17:45 | 2023-10-06 14:17:45 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using ll = long long;
#define pb emplace_back
#define X first
#define Y second
#define AI(i) begin(i), end(i)
template<class T> bool chmax(T &a, T b) { return a < b && (a = b, true);}
template<class T> bool chmin(T &a, T b) { return b < a && (a = b, true);}
#ifdef KEV
#define DE(args...) kout("[ " + string(#args) + " ] = ", args)
void kout() { cerr << endl; }
template<class T, class ...U> void kout(T a, U ...b) { cerr << a << ' ', kout(b...); }
template<class T> void debug(T l, T r) { while (l != r) cerr << *l++ << " \n"[l==r]; }
#else
#define DE(...) 0
#define debug(...) 0
#endif
const int MAX_N = 300010;
int main() {
ios_base::sync_with_stdio(0), cin.tie(0);
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
cout << i << ' ' << n + n - i << '\n';
}
cout << '\n';
auto cover = [&](int l, int r) {
cout << r << ' ' << n + n - l << '\n';
};
int i = 0;
while (i < n) {
if (i + 4 <= n) {
cover(i + 1, i + 2);
cover(i + 2, i + 4);
cover(i + 2, i + 4);
cover(i + 2, i + 4);
} else {
for (int rep = 0; rep < n - i; rep++) {
cover(i + 1 + rep, i + 1 + rep);
}
}
i += 4;
}
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3596kb
input:
150
output:
1 299 2 298 3 297 4 296 5 295 6 294 7 293 8 292 9 291 10 290 11 289 12 288 13 287 14 286 15 285 16 284 17 283 18 282 19 281 20 280 21 279 22 278 23 277 24 276 25 275 26 274 27 273 28 272 29 271 30 270 31 269 32 268 33 267 34 266 35 265 36 264 37 263 38 262 39 261 40 260 41 259 42 258 43 257 44 256 4...
result:
wrong answer Janko passed your test!