QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#539858 | #5255. Greedy Drawers | UESTC_DECAYALI | Compile Error | / | / | Python3 | 476b | 2024-08-31 15:51:35 | 2024-08-31 15:51:37 |
Judging History
answer
#include<cstdio>
#include<iostream>
#define RI register int
#define CI const int&
using namespace std;
int n;
int main()
{
scanf("%d",&n);
for (RI i=1;i<=n;++i) printf("%d %d\n",i,2*n-i);
putchar('\n');
auto cover=[&](CI l,CI r)
{
printf("%d %d\n",r,2*n-l);
};
int st=0; while (st+8<=n)
{
for (RI i=0;i<3;++i) cover(st+1,st+3),cover(st+5,st+8);
cover(st+2,st+4); cover(st+4,st+6); st+=8;
}
while (st<n) cover(st+1,st+1),++st;
return 0;
}
详细
File "answer.code", line 5 using namespace std; ^^^^^^^^^ SyntaxError: invalid syntax