結果
| 問題 |
No.3223 K-XOR Increasing Sequence
|
| コンテスト | |
| ユーザー |
Nauclhlt🪷
|
| 提出日時 | 2025-07-10 21:03:46 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 955 bytes |
| コンパイル時間 | 2,579 ms |
| コンパイル使用メモリ | 194,228 KB |
| 実行使用メモリ | 10,288 KB |
| 最終ジャッジ日時 | 2025-07-10 21:04:13 |
| 合計ジャッジ時間 | 24,601 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | WA * 6 RE * 63 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class _ForwardIterator>
void print(_ForwardIterator first, _ForwardIterator last)
{
bool f = true;
for (auto it = first; it != last; ++it)
{
if (!f)
{
cout << " ";
}
cout << *it;
f = false;
}
cout << endl;
}
int main()
{
cin.tie(nullptr);
ios::sync_with_stdio(false);
int N, K;
cin >> N >> K;
ll X, Y;
cin >> X >> Y;
if (X == 0 && K >= 2 && K % 2 == 1)
{
vector<ll> A(N);
A[1] = 1;
for (int i = 2; i < N - 1; i++)
{
int pos = (i - 2) % K;
if (pos >= K - 2)
{
A[i] = pos - (K - 4);
}
else
{
A[i] = 1;
}
}
A[N - 1] = Y;
print(A.begin(), A.end());
}
else
{
assert(X < 0);
}
}
Nauclhlt🪷