QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#539858#5255. Greedy DrawersUESTC_DECAYALICompile Error//Python3476b2024-08-31 15:51:352024-08-31 15:51:37

Judging History

你现在查看的是最新测评结果

  • [2024-08-31 15:51:37]
  • 评测
  • [2024-08-31 15:51:35]
  • 提交

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;
}

Details

  File "answer.code", line 5
    using namespace std;
          ^^^^^^^^^
SyntaxError: invalid syntax