QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#249261 | #7619. Make SYSU Great Again I | ucup-team992# | WA | 0ms | 3724kb | C++17 | 890b | 2023-11-12 02:31:00 | 2023-11-12 02:31:00 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef int uci;
#define int long long
#define F first
#define S second
#define ar array
void solve(){
int n, k;
cin >> n >> k;
int x{}, y{};
for(int i{1}; i <= k; ++i){
if(i < 2*n){
cout << ((i+1)/2) << ' ' << ((i+1)/2+(i%2==0)) << '\n';
}else if(i == 2*n){
cout << n << ' ' << 1 << '\n';
}else{
while(true){
if(y == x || y == x+1){
y++;
x += y/n;
y %= n;
}else{
cout << x+1 << ' ' << y+1 << '\n';
y++;
x += y/n;
y %= n;
break;
}
}
}
}
}
uci main(){
ios_base::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
solve();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3660kb
input:
3 6
output:
1 1 1 2 2 2 2 3 3 3 3 1
result:
ok The answer is correct.
Test #2:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
3 7
output:
1 1 1 2 2 2 2 3 3 3 3 1 1 3
result:
ok The answer is correct.
Test #3:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
2 4
output:
1 1 1 2 2 2 2 1
result:
ok The answer is correct.
Test #4:
score: -100
Wrong Answer
time: 0ms
memory: 3720kb
input:
3 9
output:
1 1 1 2 2 2 2 3 3 3 3 1 1 3 2 1 3 1
result:
wrong answer The answer is wrong: Multiple numbers filled in a grid.