| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 41331 | 真很诡异你知道吗其实我不是皇子瑞 | 【S】T2 | C++ | 解答错误 | 10 | 6 MS | 248 KB | 375 | 2026-04-16 12:58:40 |
#include<bits/stdc++.h> using namespace std; long long n,k; int main(){ scanf("%lld%lld",&n,&k); if((n%2)==0){ printf("-1"); return 0; } long long now=0; printf("%lld\n",(n-1)/2); for(int i=1;i<=n/2/k;i++){ for(int j=now;j<=now+k-1;j++){ printf("%d %d\n",j,j+1); } now+=2*k; } }