QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#670154 | #7619. Make SYSU Great Again I | AI80 | WA | 0ms | 3736kb | C++20 | 993b | 2024-10-23 20:40:14 | 2024-10-23 20:40:14 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define lowbit(x) (x & (-x))
typedef long long ll;
typedef pair<int,int> pii;
mt19937 rnd(time(0));
const int N = 5e4 + 7;
const int mod = 1e9 + 9;
void solve() {
int n , k; cin >> n >> k;
for(int i = 1;i <= n * 2;i++) {
if(i & 1) {
if(((i + 1) / 2) & 1) cout << (i + 1) / 2 << " " << 1 << "\n";
else cout << (i + 1) / 2 << " " << 2 << "\n";
}
else {
if(((i + 1) / 2) & 1) cout << (i + 1) / 2 << " " << 2 << "\n";
else cout << (i + 1) / 2 << " " << 1 << "\n";
}
}
k -= n * 2;
for(int i = 1;i <= n;i++) {
for(int j = 3;j <= n;j++) {
if(k) cout << i << " " << j << "\n",k--;
else break;
}
if(!k) break;
}
}
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
int t = 1;
// cin >> t;
while(t--) solve();
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3736kb
input:
3 6
output:
1 1 1 2 2 2 2 1 3 1 3 2
result:
wrong answer The answer is wrong: The maximum common divisor of row 3 and column -1782942592 is not the same.