QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#84262 | #5528. Least Annoying Constructive Problem | yx20220802 | Compile Error | / | / | C++14 | 1.3kb | 2023-03-06 07:54:55 | 2023-03-06 07:54:58 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-03-06 07:54:58]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-03-06 07:54:55]
- 提交
answer
#include<bits/stdc++.h>
using namespace std;
namespace IO_ER{
#define LL long long
#define db double
#define ULL unsigned long long
#define In inline
#define f(a,b,i) for(int i=a;i<=b;i++)
#define ff(a,b,i) for(int i=a;i<b;i++)
#define f_(a,b,i) for(int i=a;i>=b;i--)
#define ff_(a,b,i) for(int i=a;i>b;i--)
typedef pair<int,int> Pi;
int inf=0x3f3f3f3f;
int INF=0x7fffffff;
LL infll=0x3f3f3f3f3f3f3f3fll;
LL INFll=0x7fffffffffffffffll;
int FLAG_=0;
char CHAR=0;
template<typename T>void read(T &x){
FLAG_=0;
CHAR=getchar();
while(CHAR<'0'||'9'<CHAR){
if(CHAR=='-')FLAG_=1;
CHAR=getchar();
}
while('0'<=CHAR&&CHAR<='9'){
x=(x<<1)+(x<<3)+(CHAR^48);
CHAR=getchar();
}
x=FLAG_?-x:x;
}
template<typename T,typename ...Args>void read(T &x,Args &...args){
read(x);
read(args...);
}
}
using namespace IO_ER;
int n;
int main(){
read(n);
if(n%2==1){
ff(0,n,i){
int u=i;
inta v=(i+1)%n;
f(1,n/2,j){
printf("%d %d\n",min(u+1,v+1),max(u+1,v+1));
u=(u-1+n)%n;
v=(v+1)%n;
}
}
}
else{
ff(0,n-1,i){
int u=i;
int v=(i+1)%(n-1);
f(1,(n-1)/2,j){
printf("%d %d\n",min(u+1,v+1),max(u+1,v+1));
u=(u-1+(n-1))%(n-1);
v=(v+1)%(n-1);
}
printf("%d %d\n",v+1,n);
}
}
return 0;
}
詳細信息
answer.code: In function ‘int main()’: answer.code:46:25: error: ‘inta’ was not declared in this scope; did you mean ‘int’? 46 | inta v=(i+1)%n; | ^~~~ | int answer.code:48:58: error: ‘v’ was not declared in this scope 48 | printf("%d %d\n",min(u+1,v+1),max(u+1,v+1)); | ^