結果
| 問題 |
No.8081 HQ9+
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-15 17:09:53 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 282 bytes |
| コンパイル時間 | 2,797 ms |
| コンパイル使用メモリ | 244,620 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-02 19:22:46 |
| 合計ジャッジ時間 | 4,020 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 WA * 6 |
ソースコード
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int main() {
int n;
string s;
cin >> n >> s;
int m = round(sqrt(n));
cout << (s == string(n, 'Q') and m * m == n ? string(m, 'Q') : "-1") << endl;
return 0;
}