QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#249671 | #7619. Make SYSU Great Again I | time_interspace# | WA | 0ms | 3944kb | C++20 | 538b | 2023-11-12 13:56:34 | 2023-11-12 13:56:34 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define MAXN 200005
#define mpr make_pair
int n, k;
map<pair<int, int>, int> mp;
int main(){
cin>>n>>k;
int cnt = 0;
for(int i=1;i<n;i++){
printf("%d %d\n%d %d\n", i, i, i, i+1);
mp[mpr(i, i)] = mp[mpr(i, i+1)] = 1;
cnt += 2;
}
printf("%d %d\n%d %d\n", n, n, n, n-1);
mp[mpr(n, n)] = mp[mpr(n, n-1)] = 1;
cnt += 2;
for(int i=1;i<=n&&cnt<k;i++) for(int j=1;j<=n&&cnt<k;j++) {
if(mp[mpr(i, j)]) continue;
printf("%d %d\n", i, j);
cnt++;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3944kb
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