結果
| 問題 | No.3722 Blended Taste |
| コンテスト | |
| ユーザー |
startcpp
|
| 提出日時 | 2026-09-19 13:38:35 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 582 bytes |
| 記録 | |
| コンパイル時間 | 365 ms |
| コンパイル使用メモリ | 82,444 KB |
| 実行使用メモリ | 10,040 KB |
| 最終ジャッジ日時 | 2026-09-19 13:38:49 |
| 合計ジャッジ時間 | 4,573 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge5_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 32 WA * 9 |
ソースコード
// ビジュアライザーありがてぇーー!!
#include <iostream>
#include <vector>
#define rep(i, n) for(i = 0; i < n; i++)
using namespace std;
int main() {
int n, m, K;
cin >> n >> m >> K;
if (K * K < m) { cout << -1 << endl; return 0; }
int i, j;
vector<vector<int>> a(n, vector<int>(n));
for (int x = 0; x < n; x += K) {
int cnt = 0;
rep(i, n) {
rep(j, K) {
if (x + j >= n) break;
a[i][x + j] = cnt % m;
cnt++;
}
}
}
rep(i, n) {
rep(j, n) {
cout << a[i][j] + 1;
if (j + 1 < n) cout << " ";
}
cout << endl;
}
return 0;
}
startcpp