QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#762134 | #7619. Make SYSU Great Again I | guodong# | WA | 0ms | 3584kb | C++17 | 655b | 2024-11-19 13:52:29 | 2024-11-19 13:52:38 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
map<pair<int,int>,int>a;
int main(){
int n,k;
cin>>n>>k;
for(int i=1; i<=n*2-1; i++){
if(i%2==1)a[make_pair((i+1)/2,(i+1)/2)]=i,cout<<(i+1)/2<<' '<<(i+1)/2<<endl;
else a[make_pair(i/2,i/2+1)]=i,cout<<i/2<<' '<<i/2+1<<endl;
}
a[make_pair(n,n-1)]=n*2;
cout<<n<<' '<<n-1<<endl;
int x=1,y=1;
for(int i=n*2+1; i<=k; i++){
while(a.find(make_pair(x,y))!=a.end()){
y++;
if(y>n){
x++;
y=1;
}
}
a[make_pair(x,y)]=i;
cout<<x<<' '<<y<<endl;
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3584kb
input:
3 6
output:
1 1 1 2 2 2 2 3 3 3 3 2
result:
wrong answer The answer is wrong: There are fewer than two numbers in one row or column