QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#536150 | #7619. Make SYSU Great Again I | Foedere0 | WA | 0ms | 3640kb | C++23 | 1.2kb | 2024-08-28 19:13:40 | 2024-08-28 19:13:40 |
Judging History
answer
#include <bits/stdc++.h>
#define int long long
#define endl '\n'
using namespace std;
typedef pair<int, int> PII;
const int N = 1000010;
int mod = 998244353;
int n, m;
void solve()
{
cin >> n >> m;
int o = 1, p = 1;
int cnt = 1;
int k = 2 * n;
for (int i = 1; i <= 2 * n; i++)
{
if (n % 2 != 0 && i == 2 * n)
{
cout << o + 1 << " " << p << endl;
if (m != 2 * n)
cout << o << " " << p + 1 << endl;
k++;
break;
}
cout << o << " " << p << endl;
if (o == cnt && p == cnt)
{
p = n + 1 - cnt;
}
else if (o == cnt && p == n + 1 - cnt)
{
o = n + 1 - cnt;
}
else if (o == n + 1 - cnt && p == n + 1 - cnt)
{
p = cnt;
}
else if (o == n + 1 - cnt && p == cnt)
{
cnt++;
o = cnt;
p = cnt;
}
}
}
signed main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cout.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: 3640kb
input:
3 6
output:
1 1 1 3 3 3 3 1 2 2 3 2
result:
wrong answer The answer is wrong: The maximum common divisor of row 2 and column 1797690496 is not the same.