QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#676237 | #7619. Make SYSU Great Again I | xcyyyyy | WA | 0ms | 3796kb | C++20 | 579b | 2024-10-25 20:45:32 | 2024-10-25 20:45:32 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define N 1000005
#define fr first
#define se second
#define ls u<<1
#define rs u<<1|1
#define M 10000005
#define p 998244353
#define pb push_back
#define ll long long
#define inf 0x3f3f3f3f
#define pii pair<int,int>
int n,k,x=1,y=1;
void findnxt(){
++y;
if(y==n+1)++x,y=1;
if(y==x||y==x%n+1)findnxt();
}
int main(){
scanf("%d%d",&n,&k);
for(int i=1;i<=k;i++){
if(i<=2*n){
if(i&1)printf("%d %d\n",i/2+1,i/2+1);
else printf("%d %d\n",i/2,i/2+1);
}
else findnxt(),printf("%d %d\n",x,y);
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3796kb
input:
3 6
output:
1 1 1 2 2 2 2 3 3 3 3 4
result:
wrong answer Integer 4 violates the range [1, 3]